Citation de code source en C#n° 106
16 July 2014 à 03:02
int c = (int) App.Session.CreateCriteria(typeof(Transaction)).Add(Restrictions.Between("CreationDate", fromDateTime, toDateTime)).Add(Restrictions.Eq("SaleSession.Salesman", salesman)).Add(Restrictions.Or(Restrictions.Eq("PayMethod", "cash"), Restrictions.Eq("PayMethod", "card"))).SetProjection(Projections.Count("Id")).UniqueResult();