/// <summary> /// Handles the GetEmployeeByMatricule command. /// </summary> /// <param name="command">The command.</param> /// <returns></returns> public async Task <IEmployeeDao> HandleAsync(GetEmployeeByMatriculeCommand command) { var employeeDto = EmployeeDto.InitEmployeeMatricule(command.Matricule); var employee = await _employeeDal.GetEmployeeByMatriculeAsync(employeeDto); return(employee); }
public async Task <IEmployeeDao> Get(int matricule) { var command = new GetEmployeeByMatriculeCommand { Matricule = matricule }; IEmployeeDao employee = await _employeeHandler.HandleAsync(command).ConfigureAwait(false); return(employee); }