public virtual long GetCount(Dddml.Support.Criterion.ICriterion filter)
 {
     var criteria = CurrentSession.CreateCriteria<SellableInventoryItemState>();
     criteria.SetProjection(Projections.RowCountInt64());
     if (filter != null)
     {
         NHibernateICriterion hc = CriterionUtils.ToNHibernateCriterion(filter);
         criteria.Add(hc);
     }
     AddNotDeletedRestriction(criteria);
     return criteria.UniqueResult<long>();
 }
        public virtual long GetCount <T>(Dddml.Support.Criterion.ICriterion filter) where T : class, IPartyState
        {
            var criteria = CurrentSession.CreateCriteria <T>();

            criteria.SetProjection(Projections.RowCountInt64());
            if (filter != null)
            {
                NHibernateICriterion hc = CriterionUtils.ToNHibernateCriterion(filter);
                criteria.Add(hc);
            }
            AddNotDeletedRestriction(criteria);
            return(criteria.UniqueResult <long>());
        }
Пример #3
0
        public virtual long GetCount(Dddml.Support.Criterion.ICriterion filter)
        {
            var criteria = CurrentSession.CreateCriteria <AttributeSetInstanceExtensionFieldGroupState>();

            criteria.SetProjection(Projections.RowCountInt64());
            if (filter != null)
            {
                NHibernateICriterion hc = CriterionUtils.ToNHibernateCriterion(filter);
                criteria.Add(hc);
            }
            AddNotDeletedRestriction(criteria);
            return(criteria.UniqueResult <long>());
        }