//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;

[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata

[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_Course_Department", "Department", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Department), "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Course), true)]
[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OnlineCourse_Course", "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Course), "OnlineCourse", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.OnlineCourse), true)]
[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OnsiteCourse_Course", "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Course), "OnsiteCourse", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.OnsiteCourse), true)]
[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_StudentGrade_Course", "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Course), "StudentGrade", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.StudentGrade), true)]
[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OfficeAssignment_Person", "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Person), "OfficeAssignment", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.OfficeAssignment), true)]
[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_StudentGrade_Student", "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Person), "StudentGrade", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.StudentGrade), true)]
[assembly: EdmRelationshipAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "CourseInstructor", "Course", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Course), "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AlfredoLotar.Livro.Aspnet.SchoolModel.Person))]

#endregion

namespace AlfredoLotar.Livro.Aspnet.SchoolModel
{
    #region Contexts
    
    /// <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> Course
        {
            get
            {
                if ((_Course == null))
                {
                    _Course = base.CreateObjectSet<Course>("Course");
                }
                return _Course;
            }
        }
        private ObjectSet<Course> _Course;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Department> Department
        {
            get
            {
                if ((_Department == null))
                {
                    _Department = base.CreateObjectSet<Department>("Department");
                }
                return _Department;
            }
        }
        private ObjectSet<Department> _Department;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<OfficeAssignment> OfficeAssignment
        {
            get
            {
                if ((_OfficeAssignment == null))
                {
                    _OfficeAssignment = base.CreateObjectSet<OfficeAssignment>("OfficeAssignment");
                }
                return _OfficeAssignment;
            }
        }
        private ObjectSet<OfficeAssignment> _OfficeAssignment;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<OnlineCourse> OnlineCourse
        {
            get
            {
                if ((_OnlineCourse == null))
                {
                    _OnlineCourse = base.CreateObjectSet<OnlineCourse>("OnlineCourse");
                }
                return _OnlineCourse;
            }
        }
        private ObjectSet<OnlineCourse> _OnlineCourse;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<OnsiteCourse> OnsiteCourse
        {
            get
            {
                if ((_OnsiteCourse == null))
                {
                    _OnsiteCourse = base.CreateObjectSet<OnsiteCourse>("OnsiteCourse");
                }
                return _OnsiteCourse;
            }
        }
        private ObjectSet<OnsiteCourse> _OnsiteCourse;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Person> Person
        {
            get
            {
                if ((_Person == null))
                {
                    _Person = base.CreateObjectSet<Person>("Person");
                }
                return _Person;
            }
        }
        private ObjectSet<Person> _Person;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<StudentGrade> StudentGrade
        {
            get
            {
                if ((_StudentGrade == null))
                {
                    _StudentGrade = base.CreateObjectSet<StudentGrade>("StudentGrade");
                }
                return _StudentGrade;
            }
        }
        private ObjectSet<StudentGrade> _StudentGrade;

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Course EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCourse(Course course)
        {
            base.AddObject("Course", course);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Department EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToDepartment(Department department)
        {
            base.AddObject("Department", department);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the OfficeAssignment EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToOfficeAssignment(OfficeAssignment officeAssignment)
        {
            base.AddObject("OfficeAssignment", officeAssignment);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the OnlineCourse EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToOnlineCourse(OnlineCourse onlineCourse)
        {
            base.AddObject("OnlineCourse", onlineCourse);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the OnsiteCourse EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToOnsiteCourse(OnsiteCourse onsiteCourse)
        {
            base.AddObject("OnsiteCourse", onsiteCourse);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Person EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPerson(Person person)
        {
            base.AddObject("Person", person);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the StudentGrade EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToStudentGrade(StudentGrade studentGrade)
        {
            base.AddObject("StudentGrade", studentGrade);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="Course")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Course : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Course object.
        /// </summary>
        /// <param name="courseID">Initial value of the CourseID property.</param>
        /// <param name="title">Initial value of the Title property.</param>
        /// <param name="credits">Initial value of the Credits property.</param>
        /// <param name="departmentID">Initial value of the DepartmentID property.</param>
        public static Course CreateCourse(global::System.Int32 courseID, global::System.String title, global::System.Int32 credits, global::System.Int32 departmentID)
        {
            Course course = new Course();
            course.CourseID = courseID;
            course.Title = title;
            course.Credits = credits;
            course.DepartmentID = departmentID;
            return course;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CourseID
        {
            get
            {
                return _CourseID;
            }
            set
            {
                if (_CourseID != value)
                {
                    OnCourseIDChanging(value);
                    ReportPropertyChanging("CourseID");
                    _CourseID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CourseID");
                    OnCourseIDChanged();
                }
            }
        }
        private global::System.Int32 _CourseID;
        partial void OnCourseIDChanging(global::System.Int32 value);
        partial void OnCourseIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Credits
        {
            get
            {
                return _Credits;
            }
            set
            {
                OnCreditsChanging(value);
                ReportPropertyChanging("Credits");
                _Credits = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Credits");
                OnCreditsChanged();
            }
        }
        private global::System.Int32 _Credits;
        partial void OnCreditsChanging(global::System.Int32 value);
        partial void OnCreditsChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 DepartmentID
        {
            get
            {
                return _DepartmentID;
            }
            set
            {
                OnDepartmentIDChanging(value);
                ReportPropertyChanging("DepartmentID");
                _DepartmentID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DepartmentID");
                OnDepartmentIDChanged();
            }
        }
        private global::System.Int32 _DepartmentID;
        partial void OnDepartmentIDChanging(global::System.Int32 value);
        partial void OnDepartmentIDChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_Course_Department", "Department")]
        public Department Department
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Department>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_Course_Department", "Department").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Department>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_Course_Department", "Department").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Department> DepartmentReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Department>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_Course_Department", "Department");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Department>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_Course_Department", "Department", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OnlineCourse_Course", "OnlineCourse")]
        public OnlineCourse OnlineCourse
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OnlineCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "OnlineCourse").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OnlineCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "OnlineCourse").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<OnlineCourse> OnlineCourseReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OnlineCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "OnlineCourse");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<OnlineCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "OnlineCourse", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OnsiteCourse_Course", "OnsiteCourse")]
        public OnsiteCourse OnsiteCourse
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OnsiteCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "OnsiteCourse").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OnsiteCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "OnsiteCourse").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<OnsiteCourse> OnsiteCourseReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OnsiteCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "OnsiteCourse");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<OnsiteCourse>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "OnsiteCourse", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_StudentGrade_Course", "StudentGrade")]
        public EntityCollection<StudentGrade> StudentGrade
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<StudentGrade>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Course", "StudentGrade");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<StudentGrade>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Course", "StudentGrade", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "CourseInstructor", "Person")]
        public EntityCollection<Person> Person
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.CourseInstructor", "Person");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.CourseInstructor", "Person", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="Department")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Department : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Department object.
        /// </summary>
        /// <param name="departmentID">Initial value of the DepartmentID property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="budget">Initial value of the Budget property.</param>
        /// <param name="startDate">Initial value of the StartDate property.</param>
        public static Department CreateDepartment(global::System.Int32 departmentID, global::System.String name, global::System.Decimal budget, global::System.DateTime startDate)
        {
            Department department = new Department();
            department.DepartmentID = departmentID;
            department.Name = name;
            department.Budget = budget;
            department.StartDate = startDate;
            return department;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 DepartmentID
        {
            get
            {
                return _DepartmentID;
            }
            set
            {
                if (_DepartmentID != value)
                {
                    OnDepartmentIDChanging(value);
                    ReportPropertyChanging("DepartmentID");
                    _DepartmentID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("DepartmentID");
                    OnDepartmentIDChanged();
                }
            }
        }
        private global::System.Int32 _DepartmentID;
        partial void OnDepartmentIDChanging(global::System.Int32 value);
        partial void OnDepartmentIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal Budget
        {
            get
            {
                return _Budget;
            }
            set
            {
                OnBudgetChanging(value);
                ReportPropertyChanging("Budget");
                _Budget = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Budget");
                OnBudgetChanged();
            }
        }
        private global::System.Decimal _Budget;
        partial void OnBudgetChanging(global::System.Decimal value);
        partial void OnBudgetChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime StartDate
        {
            get
            {
                return _StartDate;
            }
            set
            {
                OnStartDateChanging(value);
                ReportPropertyChanging("StartDate");
                _StartDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StartDate");
                OnStartDateChanged();
            }
        }
        private global::System.DateTime _StartDate;
        partial void OnStartDateChanging(global::System.DateTime value);
        partial void OnStartDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> Administrator
        {
            get
            {
                return _Administrator;
            }
            set
            {
                OnAdministratorChanging(value);
                ReportPropertyChanging("Administrator");
                _Administrator = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Administrator");
                OnAdministratorChanged();
            }
        }
        private Nullable<global::System.Int32> _Administrator;
        partial void OnAdministratorChanging(Nullable<global::System.Int32> value);
        partial void OnAdministratorChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_Course_Department", "Course")]
        public EntityCollection<Course> Course
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_Course_Department", "Course");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_Course_Department", "Course", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="OfficeAssignment")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class OfficeAssignment : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new OfficeAssignment object.
        /// </summary>
        /// <param name="instructorID">Initial value of the InstructorID property.</param>
        /// <param name="location">Initial value of the Location property.</param>
        /// <param name="timestamp">Initial value of the Timestamp property.</param>
        public static OfficeAssignment CreateOfficeAssignment(global::System.Int32 instructorID, global::System.String location, global::System.Byte[] timestamp)
        {
            OfficeAssignment officeAssignment = new OfficeAssignment();
            officeAssignment.InstructorID = instructorID;
            officeAssignment.Location = location;
            officeAssignment.Timestamp = timestamp;
            return officeAssignment;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 InstructorID
        {
            get
            {
                return _InstructorID;
            }
            set
            {
                if (_InstructorID != value)
                {
                    OnInstructorIDChanging(value);
                    ReportPropertyChanging("InstructorID");
                    _InstructorID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("InstructorID");
                    OnInstructorIDChanged();
                }
            }
        }
        private global::System.Int32 _InstructorID;
        partial void OnInstructorIDChanging(global::System.Int32 value);
        partial void OnInstructorIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Location
        {
            get
            {
                return _Location;
            }
            set
            {
                OnLocationChanging(value);
                ReportPropertyChanging("Location");
                _Location = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Location");
                OnLocationChanged();
            }
        }
        private global::System.String _Location;
        partial void OnLocationChanging(global::System.String value);
        partial void OnLocationChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] Timestamp
        {
            get
            {
                return StructuralObject.GetValidValue(_Timestamp);
            }
            set
            {
                OnTimestampChanging(value);
                ReportPropertyChanging("Timestamp");
                _Timestamp = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Timestamp");
                OnTimestampChanged();
            }
        }
        private global::System.Byte[] _Timestamp;
        partial void OnTimestampChanging(global::System.Byte[] value);
        partial void OnTimestampChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OfficeAssignment_Person", "Person")]
        public Person Person
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "Person").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "Person").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Person> PersonReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "Person");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "Person", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="OnlineCourse")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class OnlineCourse : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new OnlineCourse object.
        /// </summary>
        /// <param name="courseID">Initial value of the CourseID property.</param>
        /// <param name="uRL">Initial value of the URL property.</param>
        public static OnlineCourse CreateOnlineCourse(global::System.Int32 courseID, global::System.String uRL)
        {
            OnlineCourse onlineCourse = new OnlineCourse();
            onlineCourse.CourseID = courseID;
            onlineCourse.URL = uRL;
            return onlineCourse;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CourseID
        {
            get
            {
                return _CourseID;
            }
            set
            {
                if (_CourseID != value)
                {
                    OnCourseIDChanging(value);
                    ReportPropertyChanging("CourseID");
                    _CourseID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CourseID");
                    OnCourseIDChanged();
                }
            }
        }
        private global::System.Int32 _CourseID;
        partial void OnCourseIDChanging(global::System.Int32 value);
        partial void OnCourseIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String URL
        {
            get
            {
                return _URL;
            }
            set
            {
                OnURLChanging(value);
                ReportPropertyChanging("URL");
                _URL = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("URL");
                OnURLChanged();
            }
        }
        private global::System.String _URL;
        partial void OnURLChanging(global::System.String value);
        partial void OnURLChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OnlineCourse_Course", "Course")]
        public Course Course
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "Course").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "Course").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Course> CourseReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "Course");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnlineCourse_Course", "Course", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="OnsiteCourse")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class OnsiteCourse : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new OnsiteCourse object.
        /// </summary>
        /// <param name="courseID">Initial value of the CourseID property.</param>
        /// <param name="location">Initial value of the Location property.</param>
        /// <param name="days">Initial value of the Days property.</param>
        /// <param name="time">Initial value of the Time property.</param>
        public static OnsiteCourse CreateOnsiteCourse(global::System.Int32 courseID, global::System.String location, global::System.String days, global::System.DateTime time)
        {
            OnsiteCourse onsiteCourse = new OnsiteCourse();
            onsiteCourse.CourseID = courseID;
            onsiteCourse.Location = location;
            onsiteCourse.Days = days;
            onsiteCourse.Time = time;
            return onsiteCourse;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CourseID
        {
            get
            {
                return _CourseID;
            }
            set
            {
                if (_CourseID != value)
                {
                    OnCourseIDChanging(value);
                    ReportPropertyChanging("CourseID");
                    _CourseID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CourseID");
                    OnCourseIDChanged();
                }
            }
        }
        private global::System.Int32 _CourseID;
        partial void OnCourseIDChanging(global::System.Int32 value);
        partial void OnCourseIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Location
        {
            get
            {
                return _Location;
            }
            set
            {
                OnLocationChanging(value);
                ReportPropertyChanging("Location");
                _Location = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Location");
                OnLocationChanged();
            }
        }
        private global::System.String _Location;
        partial void OnLocationChanging(global::System.String value);
        partial void OnLocationChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Days
        {
            get
            {
                return _Days;
            }
            set
            {
                OnDaysChanging(value);
                ReportPropertyChanging("Days");
                _Days = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Days");
                OnDaysChanged();
            }
        }
        private global::System.String _Days;
        partial void OnDaysChanging(global::System.String value);
        partial void OnDaysChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime Time
        {
            get
            {
                return _Time;
            }
            set
            {
                OnTimeChanging(value);
                ReportPropertyChanging("Time");
                _Time = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Time");
                OnTimeChanged();
            }
        }
        private global::System.DateTime _Time;
        partial void OnTimeChanging(global::System.DateTime value);
        partial void OnTimeChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OnsiteCourse_Course", "Course")]
        public Course Course
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "Course").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "Course").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Course> CourseReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "Course");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OnsiteCourse_Course", "Course", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="Person")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Person : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Person object.
        /// </summary>
        /// <param name="personID">Initial value of the PersonID property.</param>
        /// <param name="lastName">Initial value of the LastName property.</param>
        /// <param name="firstName">Initial value of the FirstName property.</param>
        public static Person CreatePerson(global::System.Int32 personID, global::System.String lastName, global::System.String firstName)
        {
            Person person = new Person();
            person.PersonID = personID;
            person.LastName = lastName;
            person.FirstName = firstName;
            return person;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 PersonID
        {
            get
            {
                return _PersonID;
            }
            set
            {
                if (_PersonID != value)
                {
                    OnPersonIDChanging(value);
                    ReportPropertyChanging("PersonID");
                    _PersonID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("PersonID");
                    OnPersonIDChanged();
                }
            }
        }
        private global::System.Int32 _PersonID;
        partial void OnPersonIDChanging(global::System.Int32 value);
        partial void OnPersonIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String LastName
        {
            get
            {
                return _LastName;
            }
            set
            {
                OnLastNameChanging(value);
                ReportPropertyChanging("LastName");
                _LastName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("LastName");
                OnLastNameChanged();
            }
        }
        private global::System.String _LastName;
        partial void OnLastNameChanging(global::System.String value);
        partial void OnLastNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String FirstName
        {
            get
            {
                return _FirstName;
            }
            set
            {
                OnFirstNameChanging(value);
                ReportPropertyChanging("FirstName");
                _FirstName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("FirstName");
                OnFirstNameChanged();
            }
        }
        private global::System.String _FirstName;
        partial void OnFirstNameChanging(global::System.String value);
        partial void OnFirstNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> HireDate
        {
            get
            {
                return _HireDate;
            }
            set
            {
                OnHireDateChanging(value);
                ReportPropertyChanging("HireDate");
                _HireDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("HireDate");
                OnHireDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _HireDate;
        partial void OnHireDateChanging(Nullable<global::System.DateTime> value);
        partial void OnHireDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> EnrollmentDate
        {
            get
            {
                return _EnrollmentDate;
            }
            set
            {
                OnEnrollmentDateChanging(value);
                ReportPropertyChanging("EnrollmentDate");
                _EnrollmentDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EnrollmentDate");
                OnEnrollmentDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _EnrollmentDate;
        partial void OnEnrollmentDateChanging(Nullable<global::System.DateTime> value);
        partial void OnEnrollmentDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_OfficeAssignment_Person", "OfficeAssignment")]
        public OfficeAssignment OfficeAssignment
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OfficeAssignment>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "OfficeAssignment").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OfficeAssignment>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "OfficeAssignment").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<OfficeAssignment> OfficeAssignmentReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<OfficeAssignment>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "OfficeAssignment");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<OfficeAssignment>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_OfficeAssignment_Person", "OfficeAssignment", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_StudentGrade_Student", "StudentGrade")]
        public EntityCollection<StudentGrade> StudentGrade
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<StudentGrade>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Student", "StudentGrade");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<StudentGrade>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Student", "StudentGrade", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "CourseInstructor", "Course")]
        public EntityCollection<Course> Course
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.CourseInstructor", "Course");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.CourseInstructor", "Course", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AlfredoLotar.Livro.Aspnet.SchoolModel", Name="StudentGrade")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class StudentGrade : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new StudentGrade object.
        /// </summary>
        /// <param name="enrollmentID">Initial value of the EnrollmentID property.</param>
        /// <param name="courseID">Initial value of the CourseID property.</param>
        /// <param name="studentID">Initial value of the StudentID property.</param>
        public static StudentGrade CreateStudentGrade(global::System.Int32 enrollmentID, global::System.Int32 courseID, global::System.Int32 studentID)
        {
            StudentGrade studentGrade = new StudentGrade();
            studentGrade.EnrollmentID = enrollmentID;
            studentGrade.CourseID = courseID;
            studentGrade.StudentID = studentID;
            return studentGrade;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 EnrollmentID
        {
            get
            {
                return _EnrollmentID;
            }
            set
            {
                if (_EnrollmentID != value)
                {
                    OnEnrollmentIDChanging(value);
                    ReportPropertyChanging("EnrollmentID");
                    _EnrollmentID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("EnrollmentID");
                    OnEnrollmentIDChanged();
                }
            }
        }
        private global::System.Int32 _EnrollmentID;
        partial void OnEnrollmentIDChanging(global::System.Int32 value);
        partial void OnEnrollmentIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CourseID
        {
            get
            {
                return _CourseID;
            }
            set
            {
                OnCourseIDChanging(value);
                ReportPropertyChanging("CourseID");
                _CourseID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CourseID");
                OnCourseIDChanged();
            }
        }
        private global::System.Int32 _CourseID;
        partial void OnCourseIDChanging(global::System.Int32 value);
        partial void OnCourseIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 StudentID
        {
            get
            {
                return _StudentID;
            }
            set
            {
                OnStudentIDChanging(value);
                ReportPropertyChanging("StudentID");
                _StudentID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StudentID");
                OnStudentIDChanged();
            }
        }
        private global::System.Int32 _StudentID;
        partial void OnStudentIDChanging(global::System.Int32 value);
        partial void OnStudentIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> Grade
        {
            get
            {
                return _Grade;
            }
            set
            {
                OnGradeChanging(value);
                ReportPropertyChanging("Grade");
                _Grade = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Grade");
                OnGradeChanged();
            }
        }
        private Nullable<global::System.Decimal> _Grade;
        partial void OnGradeChanging(Nullable<global::System.Decimal> value);
        partial void OnGradeChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_StudentGrade_Course", "Course")]
        public Course Course
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Course", "Course").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Course", "Course").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Course> CourseReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Course", "Course");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Course>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Course", "Course", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AlfredoLotar.Livro.Aspnet.SchoolModel", "FK_StudentGrade_Student", "Person")]
        public Person Person
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Student", "Person").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Student", "Person").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Person> PersonReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Student", "Person");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Person>("AlfredoLotar.Livro.Aspnet.SchoolModel.FK_StudentGrade_Student", "Person", value);
                }
            }
        }

        #endregion
    }

    #endregion
    
}
