예제 #1
0
        public async Task EditVacation(Vacation vacation, int id)
        {
            var vac = await _vacationRepository.GetVacation(id);

            var emp = await _empRepository.GetEmp(vac.EmpId);

            emp.Vacations = new List <Vacation>();
            emp.Vacations.Add(vacation);
            _empRepository.UpdateEmployee(emp);
            await _empRepository.SaveAsync();
        }
예제 #2
0
 public async Task CreateEmployee(Emp employee)
 {
     _empRepository.CreateEmployee(employee);
     await _empRepository.SaveAsync();
 }