I'm not too familiar with generics (concept or the syntax) in general (short of using them in collections and what not), but I was wondering if the following is the best way of accomplishing what I want. Actually, I'm not entirely positive generics will solve my problem in this case.
I've modelled and mapped a few dozen objects in NHibernate, and need some sort of universal class for my CRUD operations instead of creating a seperate persister class for each type.. such as
Sub Update(someObject as Object, objectType as String)
Dim session As ISession = NHibernateHelper.OpenSession
Dim transaction As ITransaction = session.BeginTransaction
session.Update(ctype(someObject, objectType))
transaction.Commit()
End Sub
where someObject can be different types. I know this isn't the best way of doing this (or if it'll even work) but I'm hoping someone can steer me in the right direction.