Пример #1
0
        public async Task AddAsync(TEntity entity)
        {
            //throw new NotImplementedException();
            using var context = new MyBlogContext();
            await context.AddAsync(entity);

            await context.SaveChangesAsync();
        }
Пример #2
0
        public async Task AddAsync(TEntity entity)
        {
            await _context.AddAsync(entity);

            await _context.SaveChangesAsync();
        }