Exemplo n.º 1
0
        public async Task AddAsync(TEntity entity)
        {
            //throw new NotImplementedException();
            using var context = new MyBlogContext();
            await context.AddAsync(entity);

            await context.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public async Task AddAsync(TEntity entity)
        {
            await _context.AddAsync(entity);

            await _context.SaveChangesAsync();
        }