/// <summary>
/// No Metadata Documentation available.
/// </summary>
public partial class SchoolEntities : ObjectContext
{
#region Constructors
/// <summary>
/// Initializes a new SchoolEntities object using the connection string found in the 'SchoolEntities' section of the application configuration file.
/// </summary>
public SchoolEntities() : base("name=SchoolEntities", "SchoolEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
/// <summary>
/// Initialize a new SchoolEntities object.
/// </summary>
public SchoolEntities(string connectionString) : base(connectionString, "SchoolEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
/// <summary>
/// Initialize a new SchoolEntities object.
/// </summary>
public SchoolEntities(EntityConnection connection) : base(connection, "SchoolEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
#endregion
#region Partial Methods
partial void OnContextCreated();
#endregion
#region ObjectSet Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Course> Courses
{
get
{
if ((_Courses == null))
{
_Courses = base.CreateObjectSet<Course>("Courses");
}
return _Courses;
}
}
private ObjectSet<Course> _Courses;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Department> Departments
{
get
{
if ((_Departments == null))
{
_Departments = base.CreateObjectSet<Department>("Departments");
}
return _Departments;
}
}
private ObjectSet<Department> _Departments;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Enrollment> Enrollments
{
get
{
if ((_Enrollments == null))
{
_Enrollments = base.CreateObjectSet<Enrollment>("Enrollments");
}
return _Enrollments;
}
}
private ObjectSet<Enrollment> _Enrollments;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Person> People
{
get
{
if ((_People == null))
{
_People = base.CreateObjectSet<Person>("People");
}
return _People;
}
}
private ObjectSet<Person> _People;
#endregion
#region AddTo Methods
/// <summary>
/// Deprecated Method for adding a new object to the Courses EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToCourses(Course course)
{
base.AddObject("Courses", course);
}
/// <summary>
/// Deprecated Method for adding a new object to the Departments EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToDepartments(Department department)
{
base.AddObject("Departments", department);
}
/// <summary>
/// Deprecated Method for adding a new object to the Enrollments EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToEnrollments(Enrollment enrollment)
{
base.AddObject("Enrollments", enrollment);
}
/// <summary>
/// Deprecated Method for adding a new object to the People EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToPeople(Person person)
{
base.AddObject("People", person);
}
#endregion
}