public ActionResult Create(int id) { AUTHORS_REVIEWS R = new AUTHORS_REVIEWS(); ViewBag.CmpList = db.AUTHORS.Where(k => k.AU_ID == id).ToList(); ViewBag.Author = db.AUTHORS.Where(k => k.AU_ID == id).First().AU_NAME; return(View(R)); }
public ActionResult CreateR(AUTHORS_REVIEWS R) { try { if (ModelState.IsValid) { db.AUTHORS_REVIEWS.Add(R); } db.SaveChanges(); return(RedirectToAction("AuthorReviews", new { id = R.AR_AU })); } catch { return(View(R)); } }