public ActionResult Create(CampaignReview campaignreview)
        {
            if (ModelState.IsValid)
            {
                _db.CampaignReviews.Add(campaignreview);
                _db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.CampaignID = new SelectList(_db.Campaigns, "CampaignID", "Name", campaignreview.CampaignID);
            ViewBag.UserID = new SelectList(_db.Users, "UserId", "UserName", campaignreview.UserID);
            return View(campaignreview);
        }
 public ActionResult Edit(CampaignReview campaignreview)
 {
     if (ModelState.IsValid)
     {
         _db.Entry(campaignreview).State = EntityState.Modified;
         _db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.CampaignID = new SelectList(_db.Campaigns, "CampaignID", "Name", campaignreview.CampaignID);
     ViewBag.UserID = new SelectList(_db.Users, "UserId", "UserName", campaignreview.UserID);
     return View(campaignreview);
 }
 partial void DeleteCampaignReview(CampaignReview instance);
 partial void UpdateCampaignReview(CampaignReview instance);
 partial void InsertCampaignReview(CampaignReview instance);
		private void detach_CampaignReviews(CampaignReview entity)
		{
			this.SendPropertyChanging();
			entity.Campaign = null;
		}