Esempio n. 1
0
        public async Task <IActionResult> RemoveEmail(RemoveEmployeeEmailQuery query, RemoveEmployeeEmailCommand command)
        {
            await _employeeService.HandleAsync(command);

            var queryExecutionResult = await _employeeService.HandleAsync(query);

            var vm = BuildEmailsVm(queryExecutionResult.Result);

            return(PartialView(vm));
        }
Esempio n. 2
0
        public async Task <CommandExecutionResult> HandleAsync(RemoveEmployeeEmailCommand command)
        {
            await _repository.RemoveAsync(new EmailForIdSpecification(command.EmailId));

            return(CommandExecutionResult.Success);
        }