Ejemplo n.º 1
0
        public override Task <GetAllProposalsResponse> GetAll(
            GetAllProposalsRequest request, ServerCallContext context)
        {
            var result = new GetAllProposalsResponse();

            result.Proposals.Add(repo.GetAllForConference(request.ConferenceId));
            return(Task.FromResult(result));
        }
Ejemplo n.º 2
0
        public IActionResult GetAll(int conferenceId)
        {
            var proposals = proposalRepo.GetAllForConference(conferenceId);

            if (!proposals.Any())
            {
                return(new NoContentResult());
            }
            return(new ObjectResult(proposals));
        }