/// <summary>
 /// Deprecated Method for adding a new object to the Projects EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProjects(Project project)
 {
     base.AddObject("Projects", project);
 }
 /// <summary>
 /// Create a new Project object.
 /// </summary>
 /// <param name="projectID">Initial value of the ProjectID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static Project CreateProject(global::System.Int32 projectID, global::System.String name)
 {
     Project project = new Project();
     project.ProjectID = projectID;
     project.Name = name;
     return project;
 }
        public ActionResult Edit(int id, Project proj)
        {
            if (!ModelState.IsValid)
                return View();

            try
            {
                UpdateModel(GetProjectByID(id));
                _dataModel.SaveChanges();
                return RedirectToAction("Index");
            }
            catch
            {
                return RedirectToAction("Index");
            }
        }