public IListGetAll ()
{
return Session.GetSession()
.CreateCriteria(typeof(T))
.List();
}
Because NHibernate uses generics, this function can act as a pass-through, requesting the List method be run, but not much more. My ASP .NET webforms application has to give it the table name of interest.
Again, just a fun way to rapidly get a "table viewer" application running but also providing some code value for potential full life cycle development later.
0 comments:
Post a Comment