Exemplo n.º 1
0
        public ActionResult List()
        {
            DataServiceMessage <IEnumerable <ModeratorListDTO> > serviceMessage = service.GetAll();

            if (serviceMessage.Succeeded)
            {
                IEnumerable <ModeratorListViewModel> model = AutoMapperExtensions.Map <ModeratorListDTO, ModeratorListViewModel>(serviceMessage.Data);
                return(ActionResultDependingOnGetRequest(model));
            }
            else
            {
                return(Error(serviceMessage.Errors));
            }
        }