public void AddUniversity(University university)
        {
            if (university == null)
                throw new ArgumentNullException("university");

            using (UniversityRepository universityRepository = new UniversityRepository())
            {
                universityRepository.Add(university);
                universityRepository.Commit();
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Universities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUniversities(University university)
 {
     base.AddObject("Universities", university);
 }
        public void UpdateUniversity(University university)
        {
            if (university == null)
                throw new ArgumentNullException("university");

            using (UniversityRepository universityRepository = new UniversityRepository())
            {
                var original = universityRepository.Get(university.Id);
                universityRepository.Merge(university);
                universityRepository.Commit();
            }
        }
 /// <summary>
 /// Create a new University object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="universityType">Initial value of the UniversityType property.</param>
 /// <param name="subjection">Initial value of the Subjection property.</param>
 /// <param name="educationLevel">Initial value of the EducationLevel property.</param>
 /// <param name="schoolType">Initial value of the SchoolType property.</param>
 /// <param name="is985">Initial value of the Is985 property.</param>
 /// <param name="is211">Initial value of the Is211 property.</param>
 /// <param name="isNational">Initial value of the IsNational property.</param>
 /// <param name="provinceId">Initial value of the ProvinceId property.</param>
 public static University CreateUniversity(global::System.Guid id, global::System.String name, global::System.String universityType, global::System.String subjection, global::System.String educationLevel, global::System.String schoolType, global::System.Boolean is985, global::System.Boolean is211, global::System.Boolean isNational, global::System.Guid provinceId)
 {
     University university = new University();
     university.Id = id;
     university.Name = name;
     university.UniversityType = universityType;
     university.Subjection = subjection;
     university.EducationLevel = educationLevel;
     university.SchoolType = schoolType;
     university.Is985 = is985;
     university.Is211 = is211;
     university.IsNational = isNational;
     university.ProvinceId = provinceId;
     return university;
 }