public virtual async Task <T> AddAsync(T obj) { await _db.Set <T>().AddAsync(obj); await _db.SaveChangesAsync(); return(obj); }
public GenericRepository(ticketContext context) { this._ticketContext = context; this.dbSet = context.Set <TEntity>(); }