Example #1
0
        public ActionResult Winners(int idSorteio)
        {
            var vencedores = _sorteioParticipanteAppService.GetVencedores(idSorteio);

            if (!vencedores.IsSuccessStatusCode)
            {
                return(ErrorMessage("Erro ao buscar vencedores"));
            }

            var sorteio = JsonConvert.DeserializeObject <IEnumerable <SorteioParticipanteViewModel> >(vencedores.Content.ReadAsStringAsync().Result);

            return(View("Winners", sorteio));
        }