public async Task Create(T entity) { using var context = new BlogAppContext(); await context.AddAsync(entity); await context.SaveChangesAsync(); }
public async Task AddAsync(TEntity entity) { await _context.AddAsync(entity); await _context.SaveChangesAsync(); }