public virtual async Task <bool> Add(T entity) { try { context.Set <T>().Add(entity); return(await Task.FromResult(true)); } catch (Exception e) { return(await Task.FromResult(false)); } }
public GenericRepository(AktifTelekomDbContext context) { this.context = context; this.dbSet = context.Set <T>(); }