Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        public async Task <IEmployeeDao> Get(int matricule)
        {
            var command = new GetEmployeeByMatriculeCommand {
                Matricule = matricule
            };
            IEmployeeDao employee = await _employeeHandler.HandleAsync(command).ConfigureAwait(false);

            return(employee);
        }