Ejemplo n.º 1
0
 public void SetTeam(EmployeeSetTeamViewModel employeeSetTeamViewModel)
 {
     var employeeInDb = context.Employees.Find(employeeSetTeamViewModel.Employee.StaffId);
     employeeSetTeamViewModel.Employee.TeamId = employeeSetTeamViewModel.Team.TeamId;
     context.Entry(employeeInDb).CurrentValues.SetValues(employeeSetTeamViewModel.Employee);
     context.SaveChanges();
 }
 public void SetTeam(EmployeeSetTeamViewModel employeeSetTeamViewModel)
 {
     employeeRepository.SetTeam(employeeSetTeamViewModel);
 }
 public IHttpActionResult EmployeeSetTeam(EmployeeSetTeamViewModel employeeSetTeamViewModel)
 {
     employeeDataService.SetTeam(employeeSetTeamViewModel);
     return Ok();
 }