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(); }
public async Task CreateEmployee(Emp employee) { _empRepository.CreateEmployee(employee); await _empRepository.SaveAsync(); }