Пример #1
0
 public ActionResult Edit(ContentConsulting contentconsulting)
 {
     if (ModelState.IsValid)
     {
         db.ContentConsultings.Attach(contentconsulting);
         db.ObjectStateManager.ChangeObjectState(contentconsulting, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Details", new { id = 1});
     }
     return View(contentconsulting);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ContentConsultings EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContentConsultings(ContentConsulting contentConsulting)
 {
     base.AddObject("ContentConsultings", contentConsulting);
 }
 /// <summary>
 /// Create a new ContentConsulting object.
 /// </summary>
 /// <param name="consultingID">Initial value of the ConsultingID property.</param>
 public static ContentConsulting CreateContentConsulting(global::System.Int32 consultingID)
 {
     ContentConsulting contentConsulting = new ContentConsulting();
     contentConsulting.ConsultingID = consultingID;
     return contentConsulting;
 }