Пример #1
0
        public virtual async Task Add(T obj)
        {
            if (!_service.Set <T>().Any(x => x.Id == obj.Id))
            {
                await _service.Set <T>().AddAsync(obj);

                await _service.SaveChangesAsync();
            }
        }
Пример #2
0
 public async Task <IEnumerable <BookingAction> > GetAll(Expression <Func <BookingAction, bool> > expression)
 {
     return(await _service.Set <BookingAction>().Where(expression).AsNoTracking().ToListAsync());
 }