Ejemplo n.º 1
0
        public async Task <IActionResult> RemovePhone(RemoveEmployeePhoneQuery query, RemoveEmployeePhoneCommand command)
        {
            await _employeeService.HandleAsync(command);

            var queryExecutionResult = await _employeeService.HandleAsync(query);

            var vm = BuildPhonesVm(queryExecutionResult.Result);

            return(PartialView(vm));
        }
Ejemplo n.º 2
0
        public async Task <CommandExecutionResult> HandleAsync(RemoveEmployeePhoneCommand command)
        {
            await _repository.RemoveAsync(new PhoneForIdSpecification(command.PhoneId));

            return(CommandExecutionResult.Success);
        }