//------------------------------------------------------------------------------
// <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("ReckonPayrollModel", "Employee_EmployeeManager1", "Employee", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(MvcApp_Kendo.Models.Employee), "Employee1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MvcApp_Kendo.Models.Employee), true)]
[assembly: EdmRelationshipAttribute("ReckonPayrollModel", "Employee_TypeConstraint_From_Person_To_Employee", "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MvcApp_Kendo.Models.Person), "Employee", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(MvcApp_Kendo.Models.Employee), true)]
[assembly: EdmRelationshipAttribute("ReckonPayrollModel", "MartialStatus_Person", "MartialStatus", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(MvcApp_Kendo.Models.MartialStatu), "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MvcApp_Kendo.Models.Person), true)]
[assembly: EdmRelationshipAttribute("ReckonPayrollModel", "Person_Title", "Title", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(MvcApp_Kendo.Models.Title), "Person", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MvcApp_Kendo.Models.Person), true)]

#endregion

namespace MvcApp_Kendo.Models
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class ReckonPayrollEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new ReckonPayrollEntities object using the connection string found in the 'ReckonPayrollEntities' section of the application configuration file.
        /// </summary>
        public ReckonPayrollEntities() : base("name=ReckonPayrollEntities", "ReckonPayrollEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new ReckonPayrollEntities object.
        /// </summary>
        public ReckonPayrollEntities(string connectionString) : base(connectionString, "ReckonPayrollEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new ReckonPayrollEntities object.
        /// </summary>
        public ReckonPayrollEntities(EntityConnection connection) : base(connection, "ReckonPayrollEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Appointment> Appointments
        {
            get
            {
                if ((_Appointments == null))
                {
                    _Appointments = base.CreateObjectSet<Appointment>("Appointments");
                }
                return _Appointments;
            }
        }
        private ObjectSet<Appointment> _Appointments;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Employee> Employees
        {
            get
            {
                if ((_Employees == null))
                {
                    _Employees = base.CreateObjectSet<Employee>("Employees");
                }
                return _Employees;
            }
        }
        private ObjectSet<Employee> _Employees;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MartialStatu> MartialStatus
        {
            get
            {
                if ((_MartialStatus == null))
                {
                    _MartialStatus = base.CreateObjectSet<MartialStatu>("MartialStatus");
                }
                return _MartialStatus;
            }
        }
        private ObjectSet<MartialStatu> _MartialStatus;
    
        /// <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;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Title> Titles
        {
            get
            {
                if ((_Titles == null))
                {
                    _Titles = base.CreateObjectSet<Title>("Titles");
                }
                return _Titles;
            }
        }
        private ObjectSet<Title> _Titles;

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Appointments EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToAppointments(Appointment appointment)
        {
            base.AddObject("Appointments", appointment);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToEmployees(Employee employee)
        {
            base.AddObject("Employees", employee);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MartialStatus EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMartialStatus(MartialStatu martialStatu)
        {
            base.AddObject("MartialStatus", martialStatu);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the People EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPeople(Person person)
        {
            base.AddObject("People", person);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Titles EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToTitles(Title title)
        {
            base.AddObject("Titles", title);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ReckonPayrollModel", Name="Appointment")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Appointment : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Appointment object.
        /// </summary>
        /// <param name="startTime">Initial value of the StartTime property.</param>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="endTime">Initial value of the EndTime property.</param>
        public static Appointment CreateAppointment(global::System.DateTime startTime, global::System.Int32 id, global::System.DateTime endTime)
        {
            Appointment appointment = new Appointment();
            appointment.StartTime = startTime;
            appointment.Id = id;
            appointment.EndTime = endTime;
            return appointment;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Subject
        {
            get
            {
                return _Subject;
            }
            set
            {
                OnSubjectChanging(value);
                ReportPropertyChanging("Subject");
                _Subject = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Subject");
                OnSubjectChanged();
            }
        }
        private global::System.String _Subject;
        partial void OnSubjectChanging(global::System.String value);
        partial void OnSubjectChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime StartTime
        {
            get
            {
                return _StartTime;
            }
            set
            {
                OnStartTimeChanging(value);
                ReportPropertyChanging("StartTime");
                _StartTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StartTime");
                OnStartTimeChanged();
            }
        }
        private global::System.DateTime _StartTime;
        partial void OnStartTimeChanging(global::System.DateTime value);
        partial void OnStartTimeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime EndTime
        {
            get
            {
                return _EndTime;
            }
            set
            {
                OnEndTimeChanging(value);
                ReportPropertyChanging("EndTime");
                _EndTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EndTime");
                OnEndTimeChanged();
            }
        }
        private global::System.DateTime _EndTime;
        partial void OnEndTimeChanging(global::System.DateTime value);
        partial void OnEndTimeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Description");
                OnDescriptionChanged();
            }
        }
        private global::System.String _Description;
        partial void OnDescriptionChanging(global::System.String value);
        partial void OnDescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Location
        {
            get
            {
                return _Location;
            }
            set
            {
                OnLocationChanging(value);
                ReportPropertyChanging("Location");
                _Location = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Location");
                OnLocationChanged();
            }
        }
        private global::System.String _Location;
        partial void OnLocationChanging(global::System.String value);
        partial void OnLocationChanged();

        #endregion
    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ReckonPayrollModel", Name="Employee")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Employee : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Employee object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="isDeleted">Initial value of the IsDeleted property.</param>
        public static Employee CreateEmployee(global::System.Int32 id, global::System.Boolean isDeleted)
        {
            Employee employee = new Employee();
            employee.Id = id;
            employee.IsDeleted = isDeleted;
            return employee;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsDeleted
        {
            get
            {
                return _IsDeleted;
            }
            set
            {
                OnIsDeletedChanging(value);
                ReportPropertyChanging("IsDeleted");
                _IsDeleted = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsDeleted");
                OnIsDeletedChanged();
            }
        }
        private global::System.Boolean _IsDeleted;
        partial void OnIsDeletedChanging(global::System.Boolean value);
        partial void OnIsDeletedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String EmployeeNumber
        {
            get
            {
                return _EmployeeNumber;
            }
            set
            {
                OnEmployeeNumberChanging(value);
                ReportPropertyChanging("EmployeeNumber");
                _EmployeeNumber = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("EmployeeNumber");
                OnEmployeeNumberChanged();
            }
        }
        private global::System.String _EmployeeNumber;
        partial void OnEmployeeNumberChanging(global::System.String value);
        partial void OnEmployeeNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Reference
        {
            get
            {
                return _Reference;
            }
            set
            {
                OnReferenceChanging(value);
                ReportPropertyChanging("Reference");
                _Reference = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Reference");
                OnReferenceChanged();
            }
        }
        private global::System.String _Reference;
        partial void OnReferenceChanging(global::System.String value);
        partial void OnReferenceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.Byte[] ProfilePhoto
        {
            get
            {
                return StructuralObject.GetValidValue(_ProfilePhoto);
            }
            set
            {
                OnProfilePhotoChanging(value);
                ReportPropertyChanging("ProfilePhoto");
                _ProfilePhoto = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ProfilePhoto");
                OnProfilePhotoChanged();
            }
        }
        private global::System.Byte[] _ProfilePhoto;
        partial void OnProfilePhotoChanging(global::System.Byte[] value);
        partial void OnProfilePhotoChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> WeeklyHours
        {
            get
            {
                return _WeeklyHours;
            }
            set
            {
                OnWeeklyHoursChanging(value);
                ReportPropertyChanging("WeeklyHours");
                _WeeklyHours = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WeeklyHours");
                OnWeeklyHoursChanged();
            }
        }
        private Nullable<global::System.Decimal> _WeeklyHours;
        partial void OnWeeklyHoursChanging(Nullable<global::System.Decimal> value);
        partial void OnWeeklyHoursChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> EmployeeManagerId
        {
            get
            {
                return _EmployeeManagerId;
            }
            set
            {
                OnEmployeeManagerIdChanging(value);
                ReportPropertyChanging("EmployeeManagerId");
                _EmployeeManagerId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EmployeeManagerId");
                OnEmployeeManagerIdChanged();
            }
        }
        private Nullable<global::System.Int32> _EmployeeManagerId;
        partial void OnEmployeeManagerIdChanging(Nullable<global::System.Int32> value);
        partial void OnEmployeeManagerIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> WorkTypeId
        {
            get
            {
                return _WorkTypeId;
            }
            set
            {
                OnWorkTypeIdChanging(value);
                ReportPropertyChanging("WorkTypeId");
                _WorkTypeId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WorkTypeId");
                OnWorkTypeIdChanged();
            }
        }
        private Nullable<global::System.Int32> _WorkTypeId;
        partial void OnWorkTypeIdChanging(Nullable<global::System.Int32> value);
        partial void OnWorkTypeIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> PayFrequencyId
        {
            get
            {
                return _PayFrequencyId;
            }
            set
            {
                OnPayFrequencyIdChanging(value);
                ReportPropertyChanging("PayFrequencyId");
                _PayFrequencyId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PayFrequencyId");
                OnPayFrequencyIdChanged();
            }
        }
        private Nullable<global::System.Int32> _PayFrequencyId;
        partial void OnPayFrequencyIdChanging(Nullable<global::System.Int32> value);
        partial void OnPayFrequencyIdChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ReckonPayrollModel", "Employee_EmployeeManager1", "Employee1")]
        public EntityCollection<Employee> Employee1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Employee>("ReckonPayrollModel.Employee_EmployeeManager1", "Employee1");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Employee>("ReckonPayrollModel.Employee_EmployeeManager1", "Employee1", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ReckonPayrollModel", "Employee_EmployeeManager1", "Employee")]
        public Employee Employee2
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ReckonPayrollModel.Employee_EmployeeManager1", "Employee").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ReckonPayrollModel.Employee_EmployeeManager1", "Employee").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Employee> Employee2Reference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ReckonPayrollModel.Employee_EmployeeManager1", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Employee>("ReckonPayrollModel.Employee_EmployeeManager1", "Employee", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ReckonPayrollModel", "Employee_TypeConstraint_From_Person_To_Employee", "Person")]
        public Person Person
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Person").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Person").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Person> PersonReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Person>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Person");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Person>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Person", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ReckonPayrollModel", Name="MartialStatu")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MartialStatu : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MartialStatu object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        public static MartialStatu CreateMartialStatu(global::System.Int32 id, global::System.String name)
        {
            MartialStatu martialStatu = new MartialStatu();
            martialStatu.Id = id;
            martialStatu.Name = name;
            return martialStatu;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();
    
        /// <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();

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

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ReckonPayrollModel", Name="Person")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Person : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Person object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        public static Person CreatePerson(global::System.Int32 id)
        {
            Person person = new Person();
            person.Id = id;
            return person;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String FirstName
        {
            get
            {
                return _FirstName;
            }
            set
            {
                OnFirstNameChanging(value);
                ReportPropertyChanging("FirstName");
                _FirstName = StructuralObject.SetValidValue(value, true);
                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 global::System.String LastName
        {
            get
            {
                return _LastName;
            }
            set
            {
                OnLastNameChanging(value);
                ReportPropertyChanging("LastName");
                _LastName = StructuralObject.SetValidValue(value, true);
                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=true)]
        [DataMemberAttribute()]
        public global::System.String OtherGivenName
        {
            get
            {
                return _OtherGivenName;
            }
            set
            {
                OnOtherGivenNameChanging(value);
                ReportPropertyChanging("OtherGivenName");
                _OtherGivenName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("OtherGivenName");
                OnOtherGivenNameChanged();
            }
        }
        private global::System.String _OtherGivenName;
        partial void OnOtherGivenNameChanging(global::System.String value);
        partial void OnOtherGivenNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> DateOfBirth
        {
            get
            {
                return _DateOfBirth;
            }
            set
            {
                OnDateOfBirthChanging(value);
                ReportPropertyChanging("DateOfBirth");
                _DateOfBirth = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DateOfBirth");
                OnDateOfBirthChanged();
            }
        }
        private Nullable<global::System.DateTime> _DateOfBirth;
        partial void OnDateOfBirthChanging(Nullable<global::System.DateTime> value);
        partial void OnDateOfBirthChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> TitleId
        {
            get
            {
                return _TitleId;
            }
            set
            {
                OnTitleIdChanging(value);
                ReportPropertyChanging("TitleId");
                _TitleId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("TitleId");
                OnTitleIdChanged();
            }
        }
        private Nullable<global::System.Int32> _TitleId;
        partial void OnTitleIdChanging(Nullable<global::System.Int32> value);
        partial void OnTitleIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> MartialStatusId
        {
            get
            {
                return _MartialStatusId;
            }
            set
            {
                OnMartialStatusIdChanging(value);
                ReportPropertyChanging("MartialStatusId");
                _MartialStatusId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MartialStatusId");
                OnMartialStatusIdChanged();
            }
        }
        private Nullable<global::System.Int32> _MartialStatusId;
        partial void OnMartialStatusIdChanging(Nullable<global::System.Int32> value);
        partial void OnMartialStatusIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> IsDisabled
        {
            get
            {
                return _IsDisabled;
            }
            set
            {
                OnIsDisabledChanging(value);
                ReportPropertyChanging("IsDisabled");
                _IsDisabled = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsDisabled");
                OnIsDisabledChanged();
            }
        }
        private Nullable<global::System.Boolean> _IsDisabled;
        partial void OnIsDisabledChanging(Nullable<global::System.Boolean> value);
        partial void OnIsDisabledChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ReckonPayrollModel", "Employee_TypeConstraint_From_Person_To_Employee", "Employee")]
        public Employee Employee
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Employee").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Employee").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Employee> EmployeeReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Employee>("ReckonPayrollModel.Employee_TypeConstraint_From_Person_To_Employee", "Employee", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ReckonPayrollModel", "MartialStatus_Person", "MartialStatus")]
        public MartialStatu MartialStatu
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MartialStatu>("ReckonPayrollModel.MartialStatus_Person", "MartialStatus").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MartialStatu>("ReckonPayrollModel.MartialStatus_Person", "MartialStatus").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<MartialStatu> MartialStatuReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MartialStatu>("ReckonPayrollModel.MartialStatus_Person", "MartialStatus");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<MartialStatu>("ReckonPayrollModel.MartialStatus_Person", "MartialStatus", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ReckonPayrollModel", "Person_Title", "Title")]
        public Title Title
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Title>("ReckonPayrollModel.Person_Title", "Title").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Title>("ReckonPayrollModel.Person_Title", "Title").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Title> TitleReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Title>("ReckonPayrollModel.Person_Title", "Title");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Title>("ReckonPayrollModel.Person_Title", "Title", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ReckonPayrollModel", Name="Title")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Title : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Title object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        public static Title CreateTitle(global::System.Int32 id, global::System.String name)
        {
            Title title = new Title();
            title.Id = id;
            title.Name = name;
            return title;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();
    
        /// <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();

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

        #endregion
    }

    #endregion
    
}
