Beispiel #1
0
        public async Task <IEnumerable <TEntity> > FindAsync(Func <ICriteria, ICriteria> criteriaBuilder)
        {
            Assert.NotNull(criteriaBuilder, "CriteriaBuilder must not be null");

            var criteria = new EntityCriteria();

            criteriaBuilder(criteria);

            var entityCommand = criteria.BuildCommand();

            var entities = await context
                           .Set <TEntity>()
                           .Where(entityCommand.Command, entityCommand.Values)
                           .AsNoTracking()
                           .ToListAsync();

            return(entities);
        }
 public EntityCriteriaTest()
 {
     criteria = new EntityCriteria();
 }