public static int Insert(Project project) { DataClassesBugTrackingSystemDataContext db = new DataClassesBugTrackingSystemDataContext(); db.Projects.InsertOnSubmit(project); db.SubmitChanges(); return project.ProjectId; }
public static void Update(Project project) { DataClassesBugTrackingSystemDataContext db = new DataClassesBugTrackingSystemDataContext(); Project projectToUpdate = db.Projects.Single(t => t.ProjectId == project.ProjectId); projectToUpdate.Name = project.Name; projectToUpdate.Description = project.Description; db.SubmitChanges(); }
partial void UpdateProject(Project instance);
partial void DeleteProject(Project instance);
partial void InsertProject(Project instance);