예제 #1
0
        public async Task <IActionResult> Phones(SearchEmployeePhoneQuery query)
        {
            var queryExecutionResult = await _employeeService.HandleAsync(query);

            var vm = BuildPhonesVm(queryExecutionResult.Result);

            return(View(vm));
        }
예제 #2
0
        public async Task <QueryExecutionResult <EmployeeEntity> > HandleAsync(SearchEmployeePhoneQuery query)
        {
            var employeeEntity = await _repository.FirstAsync(new EmployeeWithIdSpecification(query.EmployeeId));

            var queryExecutionResult = new QueryExecutionResult <EmployeeEntity>(employeeEntity);

            return(queryExecutionResult);
        }
예제 #3
0
 private string PhonesUri(SearchEmployeePhoneQuery query) => Url.AppUri(nameof(Phones), nameof(EmployeeController), query);