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)); }
public Task <IEnumerable <dynamic> > GetAllMySubscription([FromServices] IListaRepository repository, Guid idUser) { var result = repository.GetAllMySubscriptions(idUser); return(result); }