public IActionResult Details(int Id) { var exhibition = _repo.GetExhibition(Id); if (exhibition != null) { return(View(exhibition.ToViewModel())); } return(NotFound()); }
public IActionResult Details(int Id) { var exhibition = _repo.GetExhibition(Id); if (exhibition != null) { //generate embed url var host = HttpContext.Request.Host; var url = "http://" + host + "/?Id=" + exhibition.Id + "&exhibitionName=" + exhibition.Name.Replace("+", "%2b") + "&spexText="; exhibition.WebUrl = url; return(View(exhibition.ToViewModel())); } return(NotFound()); }
public IActionResult Create(int Id) { var exhibition = _repo.GetExhibition(Id); var viewModel = new BannerEditViewModel(); viewModel.ExhibitionId = exhibition.Id; viewModel.ExhibitionName = exhibition.Name; return(View(viewModel)); }
public IActionResult Index(int Id, string exhibitionName, string spexText) { var exhibition = _repository.GetExhibition(Id); if (exhibition == null || !exhibition.Name.Equals(exhibitionName)) { return(NotFound()); } return(View(exhibition.ToViewModel(spexText))); }