public async Task <IPagedEnumerable <Category> > GetAll(QueryFilter <Category> queryFilter = null, TrackingBehavior trackingBehavior = TrackingBehavior.Tracking)
        {
            using var session = storageFactory.CreateStorageSession();
            var repo = session.ResolveRepository <ICategoryRepository>();

            return(await repo.GetAll(queryFilter, trackingBehavior).ConfigureAwait(false));
        }
Esempio n. 2
0
        public async Task <int> GetCount()
        {
            using var session = storageFactory.CreateStorageSession();
            var repo   = session.ResolveRepository <IDevJokeRepository>();
            var result = (await repo.GetAll().ConfigureAwait(false)).Count();

            return(result);
        }