public ICommandResult Handler(GetByIdCommand command)
        {
            command.Validate();
            if (command.Invalid)
            {
                return(new GenericCommandResult(false, "Alguma coisa deu errado", command.Notifications));
            }


            var result = _listaRepository.GetAllMySubscriptions(command.Id);

            return(new GenericCommandResult(true, "SUcesso", result));
        }
Exemplo n.º 2
0
        public Task <IEnumerable <dynamic> > GetAllMySubscription([FromServices] IListaRepository repository, Guid idUser)
        {
            var result = repository.GetAllMySubscriptions(idUser);

            return(result);
        }