public async Task <Employee> Update(Employee employee)
        {
            _context.Entry(employee).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(employee);
        }
예제 #2
0
        public async Task <Position> Add(Position position)
        {
            await _context.Position.AddAsync(position);

            await _context.SaveChangesAsync();

            return(position);
        }
예제 #3
0
        public async Task <Department> Add(Department department) // добавление обьекта в БД
        {
            await _context.Department.AddAsync(department);

            await _context.SaveChangesAsync();

            return(department);
        }
예제 #4
0
        public async Task <StaffRestrict> Add(StaffRestrict staffRestrict)
        {
            await _context.StaffRestrict.AddAsync(staffRestrict);

            await _context.SaveChangesAsync();

            return(staffRestrict);
        }