Disctinct from the table
Posted
by bharat
on Stack Overflow
See other posts from Stack Overflow
or by bharat
Published on 2010-05-10T19:38:56Z
Indexed on
2010/05/10
19:44 UTC
Read the original article
Hit count: 335
nhibernate
ICriteria crit = session.CreateCriteria();
foreach (ICriteriaItem<object> param in filters)
{
crit.Add(Expression.Eq(param.PropertyName, param.FilterValue));
}
crit.SetProjection(Projections.Distinct(Projections.ProjectionList()));
-- disctinct not working can you please help me
crit.AddOrder(new Order(sortField, sortOrderAscending));
crit.SetFirstResult(pageNumber * pageSize);
crit.SetMaxResults(pageSize);
transaction.Commit();
return crit.List<IHCOSpendTable>();
© Stack Overflow or respective owner