Ejemplo n.º 1
0
        public async Task <IActionResult> RemoveIm(RemoveEmployeeImQuery query, RemoveEmployeeImCommand command)
        {
            await _employeeService.HandleAsync(command);

            var queryExecutionResult = await _employeeService.HandleAsync(query);

            var vm = BuildImsVm(queryExecutionResult.Result);

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

            return(CommandExecutionResult.Success);
        }