public async Task <Employee> Update(Employee employee) { _context.Entry(employee).State = EntityState.Modified; await _context.SaveChangesAsync(); return(employee); }
public async Task <Position> Add(Position position) { await _context.Position.AddAsync(position); await _context.SaveChangesAsync(); return(position); }
public async Task <Department> Add(Department department) // добавление обьекта в БД { await _context.Department.AddAsync(department); await _context.SaveChangesAsync(); return(department); }
public async Task <StaffRestrict> Add(StaffRestrict staffRestrict) { await _context.StaffRestrict.AddAsync(staffRestrict); await _context.SaveChangesAsync(); return(staffRestrict); }