Beispiel #1
0
        public async Task <int> Add(Company entity)
        {
            await _context.Set <Company>().AddAsync(entity);

            await _context.SaveChangesAsync();

            return(entity.Id);
        }
Beispiel #2
0
        public async Task <int> Add(Employee entity)
        {
            await _context.Set <Employee>().AddAsync(entity);

            await _context.SaveChangesAsync();

            return(entity.Id);
        }
Beispiel #3
0
 public async Task Remove(ApplicationUser entity)
 {
     _context.Set <ApplicationUser>().Remove(entity);
     await _context.SaveChangesAsync();
 }
Beispiel #4
0
 public async Task <T> GetById(long id)
 {
     return(await Context.Set <T>().FindAsync(id));
 }