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(); } }
public async Task <IEnumerable <BookingAction> > GetAll(Expression <Func <BookingAction, bool> > expression) { return(await _service.Set <BookingAction>().Where(expression).AsNoTracking().ToListAsync()); }