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)); } }
public ActionResult List() { IEnumerable <PublishingTableViewModel> publishings = mapper .Map <IEnumerable <PublishingTableViewModel> >(publishingService.GetPublishings()); return(View(publishings)); }