public ActionResult Create(CampaignComment campaigncomment)
        {
            if (ModelState.IsValid)
            {
                _db.CampaignComments.Add(campaigncomment);
                _db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.CampaignID = new SelectList(_db.Campaigns, "CampaignID", "Name", campaigncomment.CampaignID);
            ViewBag.UserID = new SelectList(_db.Users, "UserId", "UserName", campaigncomment.UserID);
            return View(campaigncomment);
        }
 partial void DeleteCampaignComment(CampaignComment instance);
 partial void UpdateCampaignComment(CampaignComment instance);
 partial void InsertCampaignComment(CampaignComment instance);
		private void detach_CampaignComments(CampaignComment entity)
		{
			this.SendPropertyChanging();
			entity.Campaign = null;
		}
 public ActionResult Edit(CampaignComment campaigncomment)
 {
     if (campaigncomment==null)return HttpNotFound();
     if (ModelState.IsValid)
     {
         _db.Entry(campaigncomment).State = EntityState.Modified;
         _db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.CampaignID = new SelectList(_db.Campaigns, "CampaignID", "Name", campaigncomment.CampaignID);
     ViewBag.UserID = new SelectList(_db.Users, "UserId", "UserName", campaigncomment.UserID);
     return View(campaigncomment);
 }