public async Task <int> Add(Company entity) { await _context.Set <Company>().AddAsync(entity); await _context.SaveChangesAsync(); return(entity.Id); }
public async Task <int> Add(Employee entity) { await _context.Set <Employee>().AddAsync(entity); await _context.SaveChangesAsync(); return(entity.Id); }
public async Task Remove(ApplicationUser entity) { _context.Set <ApplicationUser>().Remove(entity); await _context.SaveChangesAsync(); }
public async Task <T> GetById(long id) { return(await Context.Set <T>().FindAsync(id)); }