telerik grid + nhibernate + IEnumerable
This is related to:
1
The telerik grid makes it very easy to implement paging, filtering etc. using just something like this in a repository:
public IEnumerable<Organism> GetBlas()
{
return Sess开发者_开发百科ion.Query<Bla>();
}
I am just wondering whether this would also work if I map things to a view model and return IEnumerable using for example:
SetResultTransformer(NHibernate.Transform.Transformers.AliasToBean(typeof(BlaViewModel)))
and before that HQL, ICriteria or even (?) createsql?
Thanks!
Christian
Yes it will work.
ToString will be called on the properties of Bla.
精彩评论