//public abstract Task<T> GetById(long id);

        public async Task <T> Create(T entity)
        {
            var value = await _context.Set <T>().AddAsync(entity);

            await _context.SaveChangesAsync();

            return(value.Entity);
        }
Exemple #2
0
 public async Task <int> CompleteAsync()
 {
     return(await _context.SaveChangesAsync());
 }