public ActionResult Show(int id) { List <Comment> foundComments = Comment.GetCommentsByLicense(id); Dispensary foundDispensary = Dispensary.FindByLicense(id); Dictionary <string, object> model = new Dictionary <string, object> { }; model.Add("dispensary", foundDispensary); model.Add("comments", foundComments); return(View(model)); }
public ActionResult Show(int license) { List <Comment> foundComments = Comment.GetCommentsByLicense(license); Dispensary foundDispensary = Dispensary.FindByLicense(license); string name = foundDispensary.GetName(); Scraper foundScraper = Scraper.FindByName(name); Dictionary <string, object> model = new Dictionary <string, object> { }; model.Add("dispensary", foundDispensary); model.Add("comments", foundComments); model.Add("scraper", foundScraper); return(View(model)); }
public ActionResult CreateComment(int license, string review, int rating) { Comment newComment = new Comment(review, rating, license); newComment.Save(); List <Comment> foundComments = Comment.GetCommentsByLicense(license); Dispensary foundDispensary = Dispensary.FindByLicense(license); Dictionary <string, object> model = new Dictionary <string, object> { }; model.Add("dispensary", foundDispensary); model.Add("comments", foundComments); return(View("Show", model)); }