//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4927
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "SalesOrderHeader_OrderID_fkey", "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(XmlTest.Customer), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(XmlTest.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "UserDetails_FK", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(XmlTest.User), "UserDetails", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(XmlTest.UserDetails))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "UserToken_FK", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(XmlTest.User), "UserToken", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(XmlTest.UserToken))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("XmlTest", "dispTargetViews", "dispViews", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(XmlTest.dispViews), "dispViews1", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(XmlTest.dispViews))]

// Original file name: XmlTest.ObjectLayer.cs
// Generation date: 12/21/2009 7:46:26 PM
namespace XmlTest
{
    
    /// <summary>
    /// There are no comments for XmlTestContext in the schema.
    /// </summary>
    public partial class XmlTestContext : global::System.Data.Objects.ObjectContext
    {
        /// <summary>
        /// Initializes a new XmlTestContext object using the connection string found in the 'XmlTestContext' section of the application configuration file.
        /// </summary>
        public XmlTestContext() : 
                base("name=XmlTestContext", "XmlTestContext")
        {
            this.OnContextCreated();
        }
        /// <summary>
        /// Initialize a new XmlTestContext object.
        /// </summary>
        public XmlTestContext(string connectionString) : 
                base(connectionString, "XmlTestContext")
        {
            this.OnContextCreated();
        }
        /// <summary>
        /// Initialize a new XmlTestContext object.
        /// </summary>
        public XmlTestContext(global::System.Data.EntityClient.EntityConnection connection) : 
                base(connection, "XmlTestContext")
        {
            this.OnContextCreated();
        }
        partial void OnContextCreated();
        /// <summary>
        /// There are no comments for Customer in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<Customer> Customer
        {
            get
            {
                if ((this._Customer == null))
                {
                    this._Customer = base.CreateQuery<Customer>("[Customer]");
                }
                return this._Customer;
            }
        }
        private global::System.Data.Objects.ObjectQuery<Customer> _Customer;
        /// <summary>
        /// There are no comments for SalesOrderHeader in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<SalesOrderHeader> SalesOrderHeader
        {
            get
            {
                if ((this._SalesOrderHeader == null))
                {
                    this._SalesOrderHeader = base.CreateQuery<SalesOrderHeader>("[SalesOrderHeader]");
                }
                return this._SalesOrderHeader;
            }
        }
        private global::System.Data.Objects.ObjectQuery<SalesOrderHeader> _SalesOrderHeader;
        /// <summary>
        /// There are no comments for User in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<User> User
        {
            get
            {
                if ((this._User == null))
                {
                    this._User = base.CreateQuery<User>("[User]");
                }
                return this._User;
            }
        }
        private global::System.Data.Objects.ObjectQuery<User> _User;
        /// <summary>
        /// There are no comments for UserDetails in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<UserDetails> UserDetails
        {
            get
            {
                if ((this._UserDetails == null))
                {
                    this._UserDetails = base.CreateQuery<UserDetails>("[UserDetails]");
                }
                return this._UserDetails;
            }
        }
        private global::System.Data.Objects.ObjectQuery<UserDetails> _UserDetails;
        /// <summary>
        /// There are no comments for UserToken in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<UserToken> UserToken
        {
            get
            {
                if ((this._UserToken == null))
                {
                    this._UserToken = base.CreateQuery<UserToken>("[UserToken]");
                }
                return this._UserToken;
            }
        }
        private global::System.Data.Objects.ObjectQuery<UserToken> _UserToken;
        /// <summary>
        /// There are no comments for XmlTable in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<XmlTable> XmlTable
        {
            get
            {
                if ((this._XmlTable == null))
                {
                    this._XmlTable = base.CreateQuery<XmlTable>("[XmlTable]");
                }
                return this._XmlTable;
            }
        }
        private global::System.Data.Objects.ObjectQuery<XmlTable> _XmlTable;
        /// <summary>
        /// There are no comments for dispViews in the schema.
        /// </summary>
        public global::System.Data.Objects.ObjectQuery<dispViews> dispViews
        {
            get
            {
                if ((this._dispViews == null))
                {
                    this._dispViews = base.CreateQuery<dispViews>("[dispViews]");
                }
                return this._dispViews;
            }
        }
        private global::System.Data.Objects.ObjectQuery<dispViews> _dispViews;
        /// <summary>
        /// There are no comments for Customer in the schema.
        /// </summary>
        public void AddToCustomer(Customer customer)
        {
            base.AddObject("Customer", customer);
        }
        /// <summary>
        /// There are no comments for SalesOrderHeader in the schema.
        /// </summary>
        public void AddToSalesOrderHeader(SalesOrderHeader salesOrderHeader)
        {
            base.AddObject("SalesOrderHeader", salesOrderHeader);
        }
        /// <summary>
        /// There are no comments for User in the schema.
        /// </summary>
        public void AddToUser(User user)
        {
            base.AddObject("User", user);
        }
        /// <summary>
        /// There are no comments for UserDetails in the schema.
        /// </summary>
        public void AddToUserDetails(UserDetails userDetails)
        {
            base.AddObject("UserDetails", userDetails);
        }
        /// <summary>
        /// There are no comments for UserToken in the schema.
        /// </summary>
        public void AddToUserToken(UserToken userToken)
        {
            base.AddObject("UserToken", userToken);
        }
        /// <summary>
        /// There are no comments for XmlTable in the schema.
        /// </summary>
        public void AddToXmlTable(XmlTable xmlTable)
        {
            base.AddObject("XmlTable", xmlTable);
        }
        /// <summary>
        /// There are no comments for dispViews in the schema.
        /// </summary>
        public void AddTodispViews(dispViews dispViews)
        {
            base.AddObject("dispViews", dispViews);
        }
    }
    /// <summary>
    /// There are no comments for XmlTest.Customer in the schema.
    /// </summary>
    /// <KeyProperties>
    /// OrderID
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="Customer")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Customer : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Customer object.
        /// </summary>
        /// <param name="orderID">Initial value of OrderID.</param>
        /// <param name="nameStyle">Initial value of NameStyle.</param>
        /// <param name="active">Initial value of Active.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        /// <param name="created">Initial value of Created.</param>
        /// <param name="newCustomer">Initial value of NewCustomer.</param>
        /// <param name="potential">Initial value of Potential.</param>
        /// <param name="newAssigned">Initial value of NewAssigned.</param>
        /// <param name="oldActive">Initial value of OldActive.</param>
        /// <param name="total">Initial value of Total.</param>
        public static Customer CreateCustomer(int orderID, int nameStyle, bool active, global::System.DateTime modifiedDate, global::System.DateTime created, bool newCustomer, bool potential, bool newAssigned, bool oldActive, decimal total)
        {
            Customer customer = new Customer();
            customer.OrderID = orderID;
            customer.NameStyle = nameStyle;
            customer.Active = active;
            customer.ModifiedDate = modifiedDate;
            customer.Created = created;
            customer.NewCustomer = newCustomer;
            customer.Potential = potential;
            customer.NewAssigned = newAssigned;
            customer.OldActive = oldActive;
            customer.Total = total;
            return customer;
        }
        /// <summary>
        /// There are no comments for Property OrderID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int OrderID
        {
            get
            {
                return this._OrderID;
            }
            set
            {
                this.OnOrderIDChanging(value);
                this.ReportPropertyChanging("OrderID");
                this._OrderID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderID");
                this.OnOrderIDChanged();
            }
        }
        private int _OrderID;
        partial void OnOrderIDChanging(int value);
        partial void OnOrderIDChanged();
        /// <summary>
        /// There are no comments for Property NameStyle in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int NameStyle
        {
            get
            {
                return this._NameStyle;
            }
            set
            {
                this.OnNameStyleChanging(value);
                this.ReportPropertyChanging("NameStyle");
                this._NameStyle = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("NameStyle");
                this.OnNameStyleChanged();
            }
        }
        private int _NameStyle;
        partial void OnNameStyleChanging(int value);
        partial void OnNameStyleChanged();
        /// <summary>
        /// There are no comments for Property FirstName in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string FirstName
        {
            get
            {
                return this._FirstName;
            }
            set
            {
                this.OnFirstNameChanging(value);
                this.ReportPropertyChanging("FirstName");
                this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("FirstName");
                this.OnFirstNameChanged();
            }
        }
        private string _FirstName;
        partial void OnFirstNameChanging(string value);
        partial void OnFirstNameChanged();
        /// <summary>
        /// There are no comments for Property LastName in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string LastName
        {
            get
            {
                return this._LastName;
            }
            set
            {
                this.OnLastNameChanging(value);
                this.ReportPropertyChanging("LastName");
                this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("LastName");
                this.OnLastNameChanged();
            }
        }
        private string _LastName;
        partial void OnLastNameChanging(string value);
        partial void OnLastNameChanged();
        /// <summary>
        /// There are no comments for Property Active in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool Active
        {
            get
            {
                return this._Active;
            }
            set
            {
                this.OnActiveChanging(value);
                this.ReportPropertyChanging("Active");
                this._Active = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Active");
                this.OnActiveChanged();
            }
        }
        private bool _Active;
        partial void OnActiveChanging(bool value);
        partial void OnActiveChanged();
        /// <summary>
        /// There are no comments for Property ModifiedDate in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for Property TourNumber in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> TourNumber
        {
            get
            {
                return this._TourNumber;
            }
            set
            {
                this.OnTourNumberChanging(value);
                this.ReportPropertyChanging("TourNumber");
                this._TourNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TourNumber");
                this.OnTourNumberChanged();
            }
        }
        private global::System.Nullable<int> _TourNumber;
        partial void OnTourNumberChanging(global::System.Nullable<int> value);
        partial void OnTourNumberChanged();
        /// <summary>
        /// There are no comments for Property ExternalNumber in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> ExternalNumber
        {
            get
            {
                return this._ExternalNumber;
            }
            set
            {
                this.OnExternalNumberChanging(value);
                this.ReportPropertyChanging("ExternalNumber");
                this._ExternalNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ExternalNumber");
                this.OnExternalNumberChanged();
            }
        }
        private global::System.Nullable<int> _ExternalNumber;
        partial void OnExternalNumberChanging(global::System.Nullable<int> value);
        partial void OnExternalNumberChanged();
        /// <summary>
        /// There are no comments for Property MainPhone1 in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string MainPhone1
        {
            get
            {
                return this._MainPhone1;
            }
            set
            {
                this.OnMainPhone1Changing(value);
                this.ReportPropertyChanging("MainPhone1");
                this._MainPhone1 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("MainPhone1");
                this.OnMainPhone1Changed();
            }
        }
        private string _MainPhone1;
        partial void OnMainPhone1Changing(string value);
        partial void OnMainPhone1Changed();
        /// <summary>
        /// There are no comments for Property MainPhone2 in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string MainPhone2
        {
            get
            {
                return this._MainPhone2;
            }
            set
            {
                this.OnMainPhone2Changing(value);
                this.ReportPropertyChanging("MainPhone2");
                this._MainPhone2 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("MainPhone2");
                this.OnMainPhone2Changed();
            }
        }
        private string _MainPhone2;
        partial void OnMainPhone2Changing(string value);
        partial void OnMainPhone2Changed();
        /// <summary>
        /// There are no comments for Property PreOrderID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string PreOrderID
        {
            get
            {
                return this._PreOrderID;
            }
            set
            {
                this.OnPreOrderIDChanging(value);
                this.ReportPropertyChanging("PreOrderID");
                this._PreOrderID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("PreOrderID");
                this.OnPreOrderIDChanged();
            }
        }
        private string _PreOrderID;
        partial void OnPreOrderIDChanging(string value);
        partial void OnPreOrderIDChanged();
        /// <summary>
        /// There are no comments for Property LastVisit in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<global::System.DateTime> LastVisit
        {
            get
            {
                return this._LastVisit;
            }
            set
            {
                this.OnLastVisitChanging(value);
                this.ReportPropertyChanging("LastVisit");
                this._LastVisit = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LastVisit");
                this.OnLastVisitChanged();
            }
        }
        private global::System.Nullable<global::System.DateTime> _LastVisit;
        partial void OnLastVisitChanging(global::System.Nullable<global::System.DateTime> value);
        partial void OnLastVisitChanged();
        /// <summary>
        /// There are no comments for Property Created in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.DateTime Created
        {
            get
            {
                return this._Created;
            }
            set
            {
                this.OnCreatedChanging(value);
                this.ReportPropertyChanging("Created");
                this._Created = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Created");
                this.OnCreatedChanged();
            }
        }
        private global::System.DateTime _Created;
        partial void OnCreatedChanging(global::System.DateTime value);
        partial void OnCreatedChanged();
        /// <summary>
        /// There are no comments for Property ExternalName in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string ExternalName
        {
            get
            {
                return this._ExternalName;
            }
            set
            {
                this.OnExternalNameChanging(value);
                this.ReportPropertyChanging("ExternalName");
                this._ExternalName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("ExternalName");
                this.OnExternalNameChanged();
            }
        }
        private string _ExternalName;
        partial void OnExternalNameChanging(string value);
        partial void OnExternalNameChanged();
        /// <summary>
        /// There are no comments for Property NewCustomer in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool NewCustomer
        {
            get
            {
                return this._NewCustomer;
            }
            set
            {
                this.OnNewCustomerChanging(value);
                this.ReportPropertyChanging("NewCustomer");
                this._NewCustomer = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("NewCustomer");
                this.OnNewCustomerChanged();
            }
        }
        private bool _NewCustomer;
        partial void OnNewCustomerChanging(bool value);
        partial void OnNewCustomerChanged();
        /// <summary>
        /// There are no comments for Property Potential in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool Potential
        {
            get
            {
                return this._Potential;
            }
            set
            {
                this.OnPotentialChanging(value);
                this.ReportPropertyChanging("Potential");
                this._Potential = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Potential");
                this.OnPotentialChanged();
            }
        }
        private bool _Potential;
        partial void OnPotentialChanging(bool value);
        partial void OnPotentialChanged();
        /// <summary>
        /// There are no comments for Property CustomerID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> CustomerID
        {
            get
            {
                return this._CustomerID;
            }
            set
            {
                this.OnCustomerIDChanging(value);
                this.ReportPropertyChanging("CustomerID");
                this._CustomerID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CustomerID");
                this.OnCustomerIDChanged();
            }
        }
        private global::System.Nullable<int> _CustomerID;
        partial void OnCustomerIDChanging(global::System.Nullable<int> value);
        partial void OnCustomerIDChanged();
        /// <summary>
        /// There are no comments for Property OldExternalNumber in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> OldExternalNumber
        {
            get
            {
                return this._OldExternalNumber;
            }
            set
            {
                this.OnOldExternalNumberChanging(value);
                this.ReportPropertyChanging("OldExternalNumber");
                this._OldExternalNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OldExternalNumber");
                this.OnOldExternalNumberChanged();
            }
        }
        private global::System.Nullable<int> _OldExternalNumber;
        partial void OnOldExternalNumberChanging(global::System.Nullable<int> value);
        partial void OnOldExternalNumberChanged();
        /// <summary>
        /// There are no comments for Property OldTourNumber in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> OldTourNumber
        {
            get
            {
                return this._OldTourNumber;
            }
            set
            {
                this.OnOldTourNumberChanging(value);
                this.ReportPropertyChanging("OldTourNumber");
                this._OldTourNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OldTourNumber");
                this.OnOldTourNumberChanged();
            }
        }
        private global::System.Nullable<int> _OldTourNumber;
        partial void OnOldTourNumberChanging(global::System.Nullable<int> value);
        partial void OnOldTourNumberChanged();
        /// <summary>
        /// There are no comments for Property NewAssigned in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool NewAssigned
        {
            get
            {
                return this._NewAssigned;
            }
            set
            {
                this.OnNewAssignedChanging(value);
                this.ReportPropertyChanging("NewAssigned");
                this._NewAssigned = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("NewAssigned");
                this.OnNewAssignedChanged();
            }
        }
        private bool _NewAssigned;
        partial void OnNewAssignedChanging(bool value);
        partial void OnNewAssignedChanged();
        /// <summary>
        /// There are no comments for Property OldActive in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool OldActive
        {
            get
            {
                return this._OldActive;
            }
            set
            {
                this.OnOldActiveChanging(value);
                this.ReportPropertyChanging("OldActive");
                this._OldActive = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OldActive");
                this.OnOldActiveChanged();
            }
        }
        private bool _OldActive;
        partial void OnOldActiveChanging(bool value);
        partial void OnOldActiveChanged();
        /// <summary>
        /// There are no comments for Property StartDate in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<global::System.DateTime> StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        private global::System.Nullable<global::System.DateTime> _StartDate;
        partial void OnStartDateChanging(global::System.Nullable<global::System.DateTime> value);
        partial void OnStartDateChanged();
        /// <summary>
        /// There are no comments for Property Total in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal Total
        {
            get
            {
                return this._Total;
            }
            set
            {
                this.OnTotalChanging(value);
                this.ReportPropertyChanging("Total");
                this._Total = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Total");
                this.OnTotalChanged();
            }
        }
        private decimal _Total;
        partial void OnTotalChanging(decimal value);
        partial void OnTotalChanged();
        /// <summary>
        /// There are no comments for SalesOrderHeader in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "SalesOrderHeader_OrderID_fkey", "SalesOrderHeader")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<SalesOrderHeader> SalesOrderHeader
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<SalesOrderHeader>("XmlTest.SalesOrderHeader_OrderID_fkey", "SalesOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<SalesOrderHeader>("XmlTest.SalesOrderHeader_OrderID_fkey", "SalesOrderHeader", value);
                }
            }
        }
    }
    /// <summary>
    /// There are no comments for XmlTest.SalesOrderHeader in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="SalesOrderHeader")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesOrderHeader : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesOrderHeader object.
        /// </summary>
        /// <param name="status">Initial value of Status.</param>
        /// <param name="subTotal">Initial value of SubTotal.</param>
        /// <param name="totalDue">Initial value of TotalDue.</param>
        /// <param name="bookCounter">Initial value of BookCounter.</param>
        /// <param name="subSubTotal">Initial value of SubSubTotal.</param>
        /// <param name="priceRabatt15">Initial value of PriceRabatt15.</param>
        /// <param name="total">Initial value of Total.</param>
        /// <param name="discount">Initial value of Discount.</param>
        /// <param name="rabatt">Initial value of Rabatt.</param>
        /// <param name="id">Initial value of ID.</param>
        /// <param name="saison">Initial value of Saison.</param>
        public static SalesOrderHeader CreateSalesOrderHeader(int status, decimal subTotal, decimal totalDue, int bookCounter, decimal subSubTotal, bool priceRabatt15, decimal total, decimal discount, decimal rabatt, int id, string saison)
        {
            SalesOrderHeader salesOrderHeader = new SalesOrderHeader();
            salesOrderHeader.Status = status;
            salesOrderHeader.SubTotal = subTotal;
            salesOrderHeader.TotalDue = totalDue;
            salesOrderHeader.BookCounter = bookCounter;
            salesOrderHeader.SubSubTotal = subSubTotal;
            salesOrderHeader.PriceRabatt15 = priceRabatt15;
            salesOrderHeader.Total = total;
            salesOrderHeader.Discount = discount;
            salesOrderHeader.Rabatt = rabatt;
            salesOrderHeader.ID = id;
            salesOrderHeader.Saison = saison;
            return salesOrderHeader;
        }
        /// <summary>
        /// There are no comments for Property OrderDate in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<global::System.DateTime> OrderDate
        {
            get
            {
                return this._OrderDate;
            }
            set
            {
                this.OnOrderDateChanging(value);
                this.ReportPropertyChanging("OrderDate");
                this._OrderDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderDate");
                this.OnOrderDateChanged();
            }
        }
        private global::System.Nullable<global::System.DateTime> _OrderDate;
        partial void OnOrderDateChanging(global::System.Nullable<global::System.DateTime> value);
        partial void OnOrderDateChanged();
        /// <summary>
        /// There are no comments for Property Status in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int Status
        {
            get
            {
                return this._Status;
            }
            set
            {
                this.OnStatusChanging(value);
                this.ReportPropertyChanging("Status");
                this._Status = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Status");
                this.OnStatusChanged();
            }
        }
        private int _Status;
        partial void OnStatusChanging(int value);
        partial void OnStatusChanged();
        /// <summary>
        /// There are no comments for Property BillToAddressID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> BillToAddressID
        {
            get
            {
                return this._BillToAddressID;
            }
            set
            {
                this.OnBillToAddressIDChanging(value);
                this.ReportPropertyChanging("BillToAddressID");
                this._BillToAddressID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("BillToAddressID");
                this.OnBillToAddressIDChanged();
            }
        }
        private global::System.Nullable<int> _BillToAddressID;
        partial void OnBillToAddressIDChanging(global::System.Nullable<int> value);
        partial void OnBillToAddressIDChanged();
        /// <summary>
        /// There are no comments for Property SubTotal in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal SubTotal
        {
            get
            {
                return this._SubTotal;
            }
            set
            {
                this.OnSubTotalChanging(value);
                this.ReportPropertyChanging("SubTotal");
                this._SubTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SubTotal");
                this.OnSubTotalChanged();
            }
        }
        private decimal _SubTotal;
        partial void OnSubTotalChanging(decimal value);
        partial void OnSubTotalChanged();
        /// <summary>
        /// There are no comments for Property TotalDue in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal TotalDue
        {
            get
            {
                return this._TotalDue;
            }
            set
            {
                this.OnTotalDueChanging(value);
                this.ReportPropertyChanging("TotalDue");
                this._TotalDue = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TotalDue");
                this.OnTotalDueChanged();
            }
        }
        private decimal _TotalDue;
        partial void OnTotalDueChanging(decimal value);
        partial void OnTotalDueChanged();
        /// <summary>
        /// There are no comments for Property Comment in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Comment
        {
            get
            {
                return this._Comment;
            }
            set
            {
                this.OnCommentChanging(value);
                this.ReportPropertyChanging("Comment");
                this._Comment = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Comment");
                this.OnCommentChanged();
            }
        }
        private string _Comment;
        partial void OnCommentChanging(string value);
        partial void OnCommentChanged();
        /// <summary>
        /// There are no comments for Property ModifiedDate in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<global::System.DateTime> ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        private global::System.Nullable<global::System.DateTime> _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.Nullable<global::System.DateTime> value);
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for Property PaymentVersion in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> PaymentVersion
        {
            get
            {
                return this._PaymentVersion;
            }
            set
            {
                this.OnPaymentVersionChanging(value);
                this.ReportPropertyChanging("PaymentVersion");
                this._PaymentVersion = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PaymentVersion");
                this.OnPaymentVersionChanged();
            }
        }
        private global::System.Nullable<int> _PaymentVersion;
        partial void OnPaymentVersionChanging(global::System.Nullable<int> value);
        partial void OnPaymentVersionChanged();
        /// <summary>
        /// There are no comments for Property BillID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string BillID
        {
            get
            {
                return this._BillID;
            }
            set
            {
                this.OnBillIDChanging(value);
                this.ReportPropertyChanging("BillID");
                this._BillID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("BillID");
                this.OnBillIDChanged();
            }
        }
        private string _BillID;
        partial void OnBillIDChanging(string value);
        partial void OnBillIDChanged();
        /// <summary>
        /// There are no comments for Property BookCounter in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int BookCounter
        {
            get
            {
                return this._BookCounter;
            }
            set
            {
                this.OnBookCounterChanging(value);
                this.ReportPropertyChanging("BookCounter");
                this._BookCounter = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("BookCounter");
                this.OnBookCounterChanged();
            }
        }
        private int _BookCounter;
        partial void OnBookCounterChanging(int value);
        partial void OnBookCounterChanged();
        /// <summary>
        /// There are no comments for Property SendID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> SendID
        {
            get
            {
                return this._SendID;
            }
            set
            {
                this.OnSendIDChanging(value);
                this.ReportPropertyChanging("SendID");
                this._SendID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SendID");
                this.OnSendIDChanged();
            }
        }
        private global::System.Nullable<int> _SendID;
        partial void OnSendIDChanging(global::System.Nullable<int> value);
        partial void OnSendIDChanged();
        /// <summary>
        /// There are no comments for Property SubSubTotal in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal SubSubTotal
        {
            get
            {
                return this._SubSubTotal;
            }
            set
            {
                this.OnSubSubTotalChanging(value);
                this.ReportPropertyChanging("SubSubTotal");
                this._SubSubTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SubSubTotal");
                this.OnSubSubTotalChanged();
            }
        }
        private decimal _SubSubTotal;
        partial void OnSubSubTotalChanging(decimal value);
        partial void OnSubSubTotalChanged();
        /// <summary>
        /// There are no comments for Property PriceRabatt15 in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public bool PriceRabatt15
        {
            get
            {
                return this._PriceRabatt15;
            }
            set
            {
                this.OnPriceRabatt15Changing(value);
                this.ReportPropertyChanging("PriceRabatt15");
                this._PriceRabatt15 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PriceRabatt15");
                this.OnPriceRabatt15Changed();
            }
        }
        private bool _PriceRabatt15;
        partial void OnPriceRabatt15Changing(bool value);
        partial void OnPriceRabatt15Changed();
        /// <summary>
        /// There are no comments for Property Total in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal Total
        {
            get
            {
                return this._Total;
            }
            set
            {
                this.OnTotalChanging(value);
                this.ReportPropertyChanging("Total");
                this._Total = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Total");
                this.OnTotalChanged();
            }
        }
        private decimal _Total;
        partial void OnTotalChanging(decimal value);
        partial void OnTotalChanged();
        /// <summary>
        /// There are no comments for Property Discount in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal Discount
        {
            get
            {
                return this._Discount;
            }
            set
            {
                this.OnDiscountChanging(value);
                this.ReportPropertyChanging("Discount");
                this._Discount = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Discount");
                this.OnDiscountChanged();
            }
        }
        private decimal _Discount;
        partial void OnDiscountChanging(decimal value);
        partial void OnDiscountChanged();
        /// <summary>
        /// There are no comments for Property Rabatt in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public decimal Rabatt
        {
            get
            {
                return this._Rabatt;
            }
            set
            {
                this.OnRabattChanging(value);
                this.ReportPropertyChanging("Rabatt");
                this._Rabatt = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rabatt");
                this.OnRabattChanged();
            }
        }
        private decimal _Rabatt;
        partial void OnRabattChanging(decimal value);
        partial void OnRabattChanged();
        /// <summary>
        /// There are no comments for Property SendDate in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<global::System.DateTime> SendDate
        {
            get
            {
                return this._SendDate;
            }
            set
            {
                this.OnSendDateChanging(value);
                this.ReportPropertyChanging("SendDate");
                this._SendDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SendDate");
                this.OnSendDateChanged();
            }
        }
        private global::System.Nullable<global::System.DateTime> _SendDate;
        partial void OnSendDateChanging(global::System.Nullable<global::System.DateTime> value);
        partial void OnSendDateChanged();
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this.ReportPropertyChanging("ID");
                this._ID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ID");
                this.OnIDChanged();
            }
        }
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Saison in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Saison
        {
            get
            {
                return this._Saison;
            }
            set
            {
                this.OnSaisonChanging(value);
                this.ReportPropertyChanging("Saison");
                this._Saison = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Saison");
                this.OnSaisonChanged();
            }
        }
        private string _Saison;
        partial void OnSaisonChanging(string value);
        partial void OnSaisonChanged();
        /// <summary>
        /// There are no comments for Customer in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "SalesOrderHeader_OrderID_fkey", "Customer")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Customer Customer
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for Customer in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Customer> CustomerReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Customer>("XmlTest.SalesOrderHeader_OrderID_fkey", "Customer", value);
                }
            }
        }
    }
    /// <summary>
    /// There are no comments for XmlTest.User in the schema.
    /// </summary>
    /// <KeyProperties>
    /// UserId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="User")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class User : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new User object.
        /// </summary>
        /// <param name="userId">Initial value of UserId.</param>
        public static User CreateUser(int userId)
        {
            User user = new User();
            user.UserId = userId;
            return user;
        }
        /// <summary>
        /// There are no comments for Property UserId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int UserId
        {
            get
            {
                return this._UserId;
            }
            set
            {
                this.OnUserIdChanging(value);
                this.ReportPropertyChanging("UserId");
                this._UserId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("UserId");
                this.OnUserIdChanged();
            }
        }
        private int _UserId;
        partial void OnUserIdChanging(int value);
        partial void OnUserIdChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property Login in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Login
        {
            get
            {
                return this._Login;
            }
            set
            {
                this.OnLoginChanging(value);
                this.ReportPropertyChanging("Login");
                this._Login = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Login");
                this.OnLoginChanged();
            }
        }
        private string _Login;
        partial void OnLoginChanging(string value);
        partial void OnLoginChanged();
        /// <summary>
        /// There are no comments for Property StatusId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Nullable<int> StatusId
        {
            get
            {
                return this._StatusId;
            }
            set
            {
                this.OnStatusIdChanging(value);
                this.ReportPropertyChanging("StatusId");
                this._StatusId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StatusId");
                this.OnStatusIdChanged();
            }
        }
        private global::System.Nullable<int> _StatusId;
        partial void OnStatusIdChanging(global::System.Nullable<int> value);
        partial void OnStatusIdChanged();
        /// <summary>
        /// There are no comments for UserDetails in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserDetails_FK", "UserDetails")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public UserDetails UserDetails
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UserDetails>("XmlTest.UserDetails_FK", "UserDetails").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UserDetails>("XmlTest.UserDetails_FK", "UserDetails").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for UserDetails in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<UserDetails> UserDetailsReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UserDetails>("XmlTest.UserDetails_FK", "UserDetails");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<UserDetails>("XmlTest.UserDetails_FK", "UserDetails", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for UserToken in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserToken_FK", "UserToken")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public UserToken UserToken
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UserToken>("XmlTest.UserToken_FK", "UserToken").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UserToken>("XmlTest.UserToken_FK", "UserToken").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for UserToken in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<UserToken> UserTokenReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UserToken>("XmlTest.UserToken_FK", "UserToken");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<UserToken>("XmlTest.UserToken_FK", "UserToken", value);
                }
            }
        }
    }
    /// <summary>
    /// There are no comments for XmlTest.UserDetails in the schema.
    /// </summary>
    /// <KeyProperties>
    /// UserId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="UserDetails")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class UserDetails : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new UserDetails object.
        /// </summary>
        /// <param name="userId">Initial value of UserId.</param>
        public static UserDetails CreateUserDetails(int userId)
        {
            UserDetails userDetails = new UserDetails();
            userDetails.UserId = userId;
            return userDetails;
        }
        /// <summary>
        /// There are no comments for Property UserId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int UserId
        {
            get
            {
                return this._UserId;
            }
            set
            {
                this.OnUserIdChanging(value);
                this.ReportPropertyChanging("UserId");
                this._UserId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("UserId");
                this.OnUserIdChanged();
            }
        }
        private int _UserId;
        partial void OnUserIdChanging(int value);
        partial void OnUserIdChanged();
        /// <summary>
        /// There are no comments for Property Details in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Details
        {
            get
            {
                return this._Details;
            }
            set
            {
                this.OnDetailsChanging(value);
                this.ReportPropertyChanging("Details");
                this._Details = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Details");
                this.OnDetailsChanged();
            }
        }
        private string _Details;
        partial void OnDetailsChanging(string value);
        partial void OnDetailsChanged();
        /// <summary>
        /// There are no comments for User in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserDetails_FK", "User")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public User User
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<User>("XmlTest.UserDetails_FK", "User").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<User>("XmlTest.UserDetails_FK", "User").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for User in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<User> UserReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<User>("XmlTest.UserDetails_FK", "User");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<User>("XmlTest.UserDetails_FK", "User", value);
                }
            }
        }
    }
    /// <summary>
    /// There are no comments for XmlTest.UserToken in the schema.
    /// </summary>
    /// <KeyProperties>
    /// UserId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="UserToken")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class UserToken : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new UserToken object.
        /// </summary>
        /// <param name="userId">Initial value of UserId.</param>
        public static UserToken CreateUserToken(int userId)
        {
            UserToken userToken = new UserToken();
            userToken.UserId = userId;
            return userToken;
        }
        /// <summary>
        /// There are no comments for Property UserId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int UserId
        {
            get
            {
                return this._UserId;
            }
            set
            {
                this.OnUserIdChanging(value);
                this.ReportPropertyChanging("UserId");
                this._UserId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("UserId");
                this.OnUserIdChanged();
            }
        }
        private int _UserId;
        partial void OnUserIdChanging(int value);
        partial void OnUserIdChanged();
        /// <summary>
        /// There are no comments for Property Token in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string Token
        {
            get
            {
                return this._Token;
            }
            set
            {
                this.OnTokenChanging(value);
                this.ReportPropertyChanging("Token");
                this._Token = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Token");
                this.OnTokenChanged();
            }
        }
        private string _Token;
        partial void OnTokenChanging(string value);
        partial void OnTokenChanged();
        /// <summary>
        /// There are no comments for User in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "UserToken_FK", "User")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public User User
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<User>("XmlTest.UserToken_FK", "User").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<User>("XmlTest.UserToken_FK", "User").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for User in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<User> UserReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<User>("XmlTest.UserToken_FK", "User");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<User>("XmlTest.UserToken_FK", "User", value);
                }
            }
        }
    }
    /// <summary>
    /// There are no comments for XmlTest.XmlTable in the schema.
    /// </summary>
    /// <KeyProperties>
    /// key
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="XmlTable")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class XmlTable : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new XmlTable object.
        /// </summary>
        /// <param name="key">Initial value of key.</param>
        public static XmlTable CreateXmlTable(int key)
        {
            XmlTable xmlTable = new XmlTable();
            xmlTable.key = key;
            return xmlTable;
        }
        /// <summary>
        /// There are no comments for Property key in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public int key
        {
            get
            {
                return this._key;
            }
            set
            {
                this.OnkeyChanging(value);
                this.ReportPropertyChanging("key");
                this._key = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("key");
                this.OnkeyChanged();
            }
        }
        private int _key;
        partial void OnkeyChanging(int value);
        partial void OnkeyChanged();
        /// <summary>
        /// There are no comments for Property test_xml in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string test_xml
        {
            get
            {
                return this._test_xml;
            }
            set
            {
                this.Ontest_xmlChanging(value);
                this.ReportPropertyChanging("test_xml");
                this._test_xml = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("test_xml");
                this.Ontest_xmlChanged();
            }
        }
        private string _test_xml;
        partial void Ontest_xmlChanging(string value);
        partial void Ontest_xmlChanged();
    }
    /// <summary>
    /// There are no comments for XmlTest.dispViews in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ViewName
    /// MdsIdPlatformId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="XmlTest", Name="dispViews")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class dispViews : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new dispViews object.
        /// </summary>
        /// <param name="viewName">Initial value of ViewName.</param>
        /// <param name="mdsIdPlatformId">Initial value of MdsIdPlatformId.</param>
        public static dispViews CreatedispViews(string viewName, string mdsIdPlatformId)
        {
            dispViews dispViews = new dispViews();
            dispViews.ViewName = viewName;
            dispViews.MdsIdPlatformId = mdsIdPlatformId;
            return dispViews;
        }
        /// <summary>
        /// There are no comments for Property ViewName in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string ViewName
        {
            get
            {
                return this._ViewName;
            }
            set
            {
                this.OnViewNameChanging(value);
                this.ReportPropertyChanging("ViewName");
                this._ViewName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("ViewName");
                this.OnViewNameChanged();
            }
        }
        private string _ViewName;
        partial void OnViewNameChanging(string value);
        partial void OnViewNameChanged();
        /// <summary>
        /// There are no comments for Property MdsIdPlatformId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string MdsIdPlatformId
        {
            get
            {
                return this._MdsIdPlatformId;
            }
            set
            {
                this.OnMdsIdPlatformIdChanging(value);
                this.ReportPropertyChanging("MdsIdPlatformId");
                this._MdsIdPlatformId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("MdsIdPlatformId");
                this.OnMdsIdPlatformIdChanged();
            }
        }
        private string _MdsIdPlatformId;
        partial void OnMdsIdPlatformIdChanging(string value);
        partial void OnMdsIdPlatformIdChanged();
        /// <summary>
        /// There are no comments for Property DisplayName in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string DisplayName
        {
            get
            {
                return this._DisplayName;
            }
            set
            {
                this.OnDisplayNameChanging(value);
                this.ReportPropertyChanging("DisplayName");
                this._DisplayName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("DisplayName");
                this.OnDisplayNameChanged();
            }
        }
        private string _DisplayName;
        partial void OnDisplayNameChanging(string value);
        partial void OnDisplayNameChanged();
        /// <summary>
        /// There are no comments for Property ImageFileName in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public string ImageFileName
        {
            get
            {
                return this._ImageFileName;
            }
            set
            {
                this.OnImageFileNameChanging(value);
                this.ReportPropertyChanging("ImageFileName");
                this._ImageFileName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("ImageFileName");
                this.OnImageFileNameChanged();
            }
        }
        private string _ImageFileName;
        partial void OnImageFileNameChanging(string value);
        partial void OnImageFileNameChanged();
        /// <summary>
        /// There are no comments for dispViews1 in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "dispTargetViews", "dispViews1")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<dispViews> dispViews1
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<dispViews>("XmlTest.dispTargetViews", "dispViews1");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<dispViews>("XmlTest.dispTargetViews", "dispViews1", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for dispViews2 in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("XmlTest", "dispTargetViews", "dispViews")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<dispViews> dispViews2
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<dispViews>("XmlTest.dispTargetViews", "dispViews");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<dispViews>("XmlTest.dispTargetViews", "dispViews", value);
                }
            }
        }
    }
}
