Example #1
0
 public async Task CreateAsync <TEntity>(TEntity entity) where TEntity : class
 {
     await _context.AddAsync(entity);
 }
Example #2
0
        public async Task <bool> AddAsync <TEntity>(TEntity item) where TEntity : class
        {
            await _db.AddAsync <TEntity>(item);

            return(await _db.SaveChangesAsync() >= 0);
        }