/// <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); }
/// <summary> /// Handles the DeleteEmployee command /// </summary> /// <param name="command">The command</param> /// <returns></returns> public async Task HandleAsync(DeleteEmployeeCommand command) { var employeeDto = EmployeeDto.InitEmployeeMatricule(command.Matricule); await _employeeDal.DeleteEmployeeAsync(employeeDto); }