Ejemplo n.º 1
0
 public ActionResult Edit(ContentProject contentproject)
 {
     if (ModelState.IsValid)
     {
         db.ContentProjects.Attach(contentproject);
         db.ObjectStateManager.ChangeObjectState(contentproject, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Details", new { id = 1 });
     }
     return View(contentproject);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ContentProjects EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContentProjects(ContentProject contentProject)
 {
     base.AddObject("ContentProjects", contentProject);
 }
 /// <summary>
 /// Create a new ContentProject object.
 /// </summary>
 /// <param name="projectID">Initial value of the ProjectID property.</param>
 public static ContentProject CreateContentProject(global::System.Int32 projectID)
 {
     ContentProject contentProject = new ContentProject();
     contentProject.ProjectID = projectID;
     return contentProject;
 }