public async Task <IActionResult> GetUserAsync(string email)
        {
            User user = await Bus.Execute(new GetUserByMailQuery(email));

            var userResult = mapper.Map <UserDetailsModel>(user);

            if (userResult is null)
            {
                return(NotFound());
            }

            return(Ok(userResult));
        }
Esempio n. 2
0
        public IMediatorCommandResponse Execute(IMediatorCommand command)
        {
            IMediatorHandler handler = get_handler_from_command(command);

            return(handler.Execute(command));
        }