Ejemplo n.º 1
0
        public ActionResult Create()
        {
            var pl    = publishingService.GetPublishings();
            var model = new CreateReviewModel()
            {
                PublishingList = mapper.Map <IEnumerable <PublishingModel> >(pl),
                ReviwerId      = GetUserId()
            };

            return(View(model));
        }
        public IHttpActionResult GetPublishings()
        {
            var publishings = publishingService.GetPublishings();

            if (publishings != null)
            {
                return(Ok(publishings.Select(p => new { p.Id, p.Title })));
            }
            else
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
        }
Ejemplo n.º 3
0
        public ActionResult List()
        {
            IEnumerable <PublishingTableViewModel> publishings = mapper
                                                                 .Map <IEnumerable <PublishingTableViewModel> >(publishingService.GetPublishings());

            return(View(publishings));
        }