partial void UpdateCourse(Course instance);
 partial void DeleteCourse(Course instance);
 partial void InsertCourse(Course instance);
		private void detach_Courses(Course entity)
		{
			this.SendPropertyChanging();
			entity.Year = null;
		}
		private void attach_Courses(Course entity)
		{
			this.SendPropertyChanging();
			entity.Year = this;
		}
 public int Add(Course c)
 {
     db.Courses.InsertOnSubmit(c);
     db.SubmitChanges();
     return c.CID;
 }
 public int SaveNewTournCourse(string name, int YID, int ST)
 {
     DataRepository dataRepository = new DataRepository();
     Course course = new Course();
     course.CourseName = name;
     course.Stableford_Total = ST;
     course.YID = YID;
     int CID = dataRepository.Add(course);
     return CID;
 }