Esempio n. 1
0
 public OutputBase AddSupervisor(SupervisorDto supervisor)
 {
     if (
         _supervisorRepository.Query(
             q => q.Any(s => s.EmployeeId == supervisor.EmployeeId && s.SupervisorId == supervisor.SupervisorId)))
     {
         return(new OutputBase
         {
             Message = "The selected Supervisor hase already been added for this Employee",
             Success = false
         });
     }
     _supervisorRepository.Insert(Mapper.Map <Supervisor>(supervisor));
     return(new OutputBase {
         Message = "Save successfully", Success = true
     });
 }