generic functions vb.net
i'm too informed generics (concept syntax) whole (short controlling collections not), nonetheless i wondering following best proceed accomplishing i want. actually, i'm wholly certain generics solve problem case.
i've modelled mapped few dozen objects nhibernate, need arrange concept category gunk operations instead formulating seperate persister category any type.. such as
sub update(someobject object, objecttype string)
low event isession = nhibernatehelper.opensession
low transaction itransaction = session.begintransaction
session.update(ctype(someobject, objecttype))
transaction.commit()
end sub
where someobject opposite types. i know isn't best proceed doing (or it'll even work) nonetheless i'm anticipating someone expostulate me right direction.
Comments
Post a Comment