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)); }
public async Task <CommandExecutionResult> HandleAsync(RemoveEmployeePhoneCommand command) { await _repository.RemoveAsync(new PhoneForIdSpecification(command.PhoneId)); return(CommandExecutionResult.Success); }