public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tutorials tutorials = tutorialsCRUD.GetTutorialsById(id); TutorialsModel tutorialsModel = tutorials.ToModel(); return(View(tutorialsModel)); }
public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (Session[id] == null) { HttpContext.Session.Add(id, id); pcs.PageViewDetails(id); } ViewBag.PageViewCount = pcs.GetPageViewCountByResourceID(id); Tutorials tutorials = tutorialsCRUD.GetTutorialsById(id); return(View(tutorials.ToModel())); }