public EmploymentsDTO GetAllEmploymentsByEmployeeId(int id) { try { var employmentsList = _employmentService.GetAllEmploymentsByEmployeeId(id); var result = new EmploymentsDTO { Employments = employmentsList, Status = CollectionGetStatus.Success }; return(result); } catch (Exception e) { Console.Write(e.Message); var result = new EmploymentsDTO { Status = CollectionGetStatus.Failure }; return(result); } }