public virtual long GetCount(IEnumerable<KeyValuePair<string, object>> filter)
 {
     var criteria = CurrentSession.CreateCriteria<SellableInventoryItemState>();
     criteria.SetProjection(Projections.RowCountInt64());
     NHibernateUtils.CriteriaAddFilter(criteria, filter);
     AddNotDeletedRestriction(criteria);
     return criteria.UniqueResult<long>();
 }
        public virtual long GetCount <T>(IEnumerable <KeyValuePair <string, object> > filter) where T : class, IPartyState
        {
            var criteria = CurrentSession.CreateCriteria <T>();

            criteria.SetProjection(Projections.RowCountInt64());
            NHibernateUtils.CriteriaAddFilter(criteria, filter);
            AddNotDeletedRestriction(criteria);
            return(criteria.UniqueResult <long>());
        }
Пример #3
0
        public virtual long GetCount(IEnumerable <KeyValuePair <string, object> > filter)
        {
            var criteria = CurrentSession.CreateCriteria <AttributeSetInstanceExtensionFieldGroupState>();

            criteria.SetProjection(Projections.RowCountInt64());
            NHibernateUtils.CriteriaAddFilter(criteria, filter);
            AddNotDeletedRestriction(criteria);
            return(criteria.UniqueResult <long>());
        }