Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Integrate Reporting Services with Silverlight and RIA Services

, 28 Jul 2010 CPOL
Integrate Reporting Services with your Silverlight Line-of-Business applications.
ReportingServicesDemo.zip
ReportingServicesDemo
ReportingServicesDemo
Assets
Resources
Bin
Controls
Generated_Code
Models
Shared
Helpers
Libs
System.Windows.Controls.Data.DataForm.Toolkit.dll
Models
Properties
DataSources
ReportingServicesDemo.Web.ADWLTDomainContext.datasource
ReportingServicesDemo.Web.UserRegistrationContext.datasource
ReportingServicesDemo.csproj.user
Views
Login
Web
Resources
ReportingServicesDemo.Web
ADWLTModel.edmx
App_Data
bin
ClientBin
ReportingServicesDemo.xap
DemoReport.rdlc
Models
Shared
Properties
ReportingServicesDemo.Web.csproj.user
Resources
Services
//------------------------------------------------------------------------------
// <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("AdventureWorksLT2008Model", "FK_CustomerAddress_Address_AddressID", "Address", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.Address), "CustomerAddress", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.CustomerAddress), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Address_BillTo_AddressID", "Address", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(ReportingServicesDemo.Web.Address), "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.SalesOrderHeader), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Address_ShipTo_AddressID", "Address", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(ReportingServicesDemo.Web.Address), "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.SalesOrderHeader), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_CustomerAddress_Customer_CustomerID", "Customer", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.Customer), "CustomerAddress", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.CustomerAddress), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Customer_CustomerID", "Customer", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.Customer), "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.SalesOrderHeader), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_Product_ProductCategory_ProductCategoryID", "ProductCategory", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(ReportingServicesDemo.Web.ProductCategory), "Product", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.Product), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_Product_ProductModel_ProductModelID", "ProductModel", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(ReportingServicesDemo.Web.ProductModel), "Product", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.Product), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_SalesOrderDetail_Product_ProductID", "Product", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.Product), "SalesOrderDetail", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.SalesOrderDetail), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(ReportingServicesDemo.Web.ProductCategory), "ProductCategory1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.ProductCategory), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_ProductModelProductDescription_ProductDescription_ProductDescriptionID", "ProductDescription", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.ProductDescription), "ProductModelProductDescription", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.ProductModelProductDescription), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_ProductModelProductDescription_ProductModel_ProductModelID", "ProductModel", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.ProductModel), "ProductModelProductDescription", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.ProductModelProductDescription), true)]
[assembly: EdmRelationshipAttribute("AdventureWorksLT2008Model", "FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(ReportingServicesDemo.Web.SalesOrderHeader), "SalesOrderDetail", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(ReportingServicesDemo.Web.SalesOrderDetail), true)]

#endregion

namespace ReportingServicesDemo.Web
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class AdventureWorksLT2008Entities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new AdventureWorksLT2008Entities object using the connection string found in the 'AdventureWorksLT2008Entities' section of the application configuration file.
        /// </summary>
        public AdventureWorksLT2008Entities() : base("name=AdventureWorksLT2008Entities", "AdventureWorksLT2008Entities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new AdventureWorksLT2008Entities object.
        /// </summary>
        public AdventureWorksLT2008Entities(string connectionString) : base(connectionString, "AdventureWorksLT2008Entities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new AdventureWorksLT2008Entities object.
        /// </summary>
        public AdventureWorksLT2008Entities(EntityConnection connection) : base(connection, "AdventureWorksLT2008Entities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<BuildVersion> BuildVersion
        {
            get
            {
                if ((_BuildVersion == null))
                {
                    _BuildVersion = base.CreateObjectSet<BuildVersion>("BuildVersion");
                }
                return _BuildVersion;
            }
        }
        private ObjectSet<BuildVersion> _BuildVersion;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<ErrorLog> ErrorLog
        {
            get
            {
                if ((_ErrorLog == null))
                {
                    _ErrorLog = base.CreateObjectSet<ErrorLog>("ErrorLog");
                }
                return _ErrorLog;
            }
        }
        private ObjectSet<ErrorLog> _ErrorLog;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<sysdiagrams> sysdiagrams
        {
            get
            {
                if ((_sysdiagrams == null))
                {
                    _sysdiagrams = base.CreateObjectSet<sysdiagrams>("sysdiagrams");
                }
                return _sysdiagrams;
            }
        }
        private ObjectSet<sysdiagrams> _sysdiagrams;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Address> Address
        {
            get
            {
                if ((_Address == null))
                {
                    _Address = base.CreateObjectSet<Address>("Address");
                }
                return _Address;
            }
        }
        private ObjectSet<Address> _Address;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Customer> Customer
        {
            get
            {
                if ((_Customer == null))
                {
                    _Customer = base.CreateObjectSet<Customer>("Customer");
                }
                return _Customer;
            }
        }
        private ObjectSet<Customer> _Customer;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<CustomerAddress> CustomerAddress
        {
            get
            {
                if ((_CustomerAddress == null))
                {
                    _CustomerAddress = base.CreateObjectSet<CustomerAddress>("CustomerAddress");
                }
                return _CustomerAddress;
            }
        }
        private ObjectSet<CustomerAddress> _CustomerAddress;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Product> Product
        {
            get
            {
                if ((_Product == null))
                {
                    _Product = base.CreateObjectSet<Product>("Product");
                }
                return _Product;
            }
        }
        private ObjectSet<Product> _Product;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<ProductCategory> ProductCategory
        {
            get
            {
                if ((_ProductCategory == null))
                {
                    _ProductCategory = base.CreateObjectSet<ProductCategory>("ProductCategory");
                }
                return _ProductCategory;
            }
        }
        private ObjectSet<ProductCategory> _ProductCategory;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<ProductDescription> ProductDescription
        {
            get
            {
                if ((_ProductDescription == null))
                {
                    _ProductDescription = base.CreateObjectSet<ProductDescription>("ProductDescription");
                }
                return _ProductDescription;
            }
        }
        private ObjectSet<ProductDescription> _ProductDescription;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<ProductModel> ProductModel
        {
            get
            {
                if ((_ProductModel == null))
                {
                    _ProductModel = base.CreateObjectSet<ProductModel>("ProductModel");
                }
                return _ProductModel;
            }
        }
        private ObjectSet<ProductModel> _ProductModel;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<ProductModelProductDescription> ProductModelProductDescription
        {
            get
            {
                if ((_ProductModelProductDescription == null))
                {
                    _ProductModelProductDescription = base.CreateObjectSet<ProductModelProductDescription>("ProductModelProductDescription");
                }
                return _ProductModelProductDescription;
            }
        }
        private ObjectSet<ProductModelProductDescription> _ProductModelProductDescription;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<SalesOrderDetail> SalesOrderDetail
        {
            get
            {
                if ((_SalesOrderDetail == null))
                {
                    _SalesOrderDetail = base.CreateObjectSet<SalesOrderDetail>("SalesOrderDetail");
                }
                return _SalesOrderDetail;
            }
        }
        private ObjectSet<SalesOrderDetail> _SalesOrderDetail;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<SalesOrderHeader> SalesOrderHeader
        {
            get
            {
                if ((_SalesOrderHeader == null))
                {
                    _SalesOrderHeader = base.CreateObjectSet<SalesOrderHeader>("SalesOrderHeader");
                }
                return _SalesOrderHeader;
            }
        }
        private ObjectSet<SalesOrderHeader> _SalesOrderHeader;

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the BuildVersion EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToBuildVersion(BuildVersion buildVersion)
        {
            base.AddObject("BuildVersion", buildVersion);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the ErrorLog EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToErrorLog(ErrorLog errorLog)
        {
            base.AddObject("ErrorLog", errorLog);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the sysdiagrams EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddTosysdiagrams(sysdiagrams sysdiagrams)
        {
            base.AddObject("sysdiagrams", sysdiagrams);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Address EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToAddress(Address address)
        {
            base.AddObject("Address", address);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Customer EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCustomer(Customer customer)
        {
            base.AddObject("Customer", customer);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the CustomerAddress EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCustomerAddress(CustomerAddress customerAddress)
        {
            base.AddObject("CustomerAddress", customerAddress);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Product EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToProduct(Product product)
        {
            base.AddObject("Product", product);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the ProductCategory EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToProductCategory(ProductCategory productCategory)
        {
            base.AddObject("ProductCategory", productCategory);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the ProductDescription EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToProductDescription(ProductDescription productDescription)
        {
            base.AddObject("ProductDescription", productDescription);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the ProductModel EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToProductModel(ProductModel productModel)
        {
            base.AddObject("ProductModel", productModel);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the ProductModelProductDescription EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToProductModelProductDescription(ProductModelProductDescription productModelProductDescription)
        {
            base.AddObject("ProductModelProductDescription", productModelProductDescription);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the SalesOrderDetail EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSalesOrderDetail(SalesOrderDetail salesOrderDetail)
        {
            base.AddObject("SalesOrderDetail", salesOrderDetail);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the SalesOrderHeader EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSalesOrderHeader(SalesOrderHeader salesOrderHeader)
        {
            base.AddObject("SalesOrderHeader", salesOrderHeader);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="Address")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Address : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Address object.
        /// </summary>
        /// <param name="addressID">Initial value of the AddressID property.</param>
        /// <param name="addressLine1">Initial value of the AddressLine1 property.</param>
        /// <param name="city">Initial value of the City property.</param>
        /// <param name="stateProvince">Initial value of the StateProvince property.</param>
        /// <param name="countryRegion">Initial value of the CountryRegion property.</param>
        /// <param name="postalCode">Initial value of the PostalCode property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static Address CreateAddress(global::System.Int32 addressID, global::System.String addressLine1, global::System.String city, global::System.String stateProvince, global::System.String countryRegion, global::System.String postalCode, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Address address = new Address();
            address.AddressID = addressID;
            address.AddressLine1 = addressLine1;
            address.City = city;
            address.StateProvince = stateProvince;
            address.CountryRegion = countryRegion;
            address.PostalCode = postalCode;
            address.rowguid = rowguid;
            address.ModifiedDate = modifiedDate;
            return address;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 AddressID
        {
            get
            {
                return _AddressID;
            }
            set
            {
                if (_AddressID != value)
                {
                    OnAddressIDChanging(value);
                    ReportPropertyChanging("AddressID");
                    _AddressID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("AddressID");
                    OnAddressIDChanged();
                }
            }
        }
        private global::System.Int32 _AddressID;
        partial void OnAddressIDChanging(global::System.Int32 value);
        partial void OnAddressIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String AddressLine1
        {
            get
            {
                return _AddressLine1;
            }
            set
            {
                OnAddressLine1Changing(value);
                ReportPropertyChanging("AddressLine1");
                _AddressLine1 = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("AddressLine1");
                OnAddressLine1Changed();
            }
        }
        private global::System.String _AddressLine1;
        partial void OnAddressLine1Changing(global::System.String value);
        partial void OnAddressLine1Changed();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String AddressLine2
        {
            get
            {
                return _AddressLine2;
            }
            set
            {
                OnAddressLine2Changing(value);
                ReportPropertyChanging("AddressLine2");
                _AddressLine2 = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("AddressLine2");
                OnAddressLine2Changed();
            }
        }
        private global::System.String _AddressLine2;
        partial void OnAddressLine2Changing(global::System.String value);
        partial void OnAddressLine2Changed();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String City
        {
            get
            {
                return _City;
            }
            set
            {
                OnCityChanging(value);
                ReportPropertyChanging("City");
                _City = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("City");
                OnCityChanged();
            }
        }
        private global::System.String _City;
        partial void OnCityChanging(global::System.String value);
        partial void OnCityChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String StateProvince
        {
            get
            {
                return _StateProvince;
            }
            set
            {
                OnStateProvinceChanging(value);
                ReportPropertyChanging("StateProvince");
                _StateProvince = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("StateProvince");
                OnStateProvinceChanged();
            }
        }
        private global::System.String _StateProvince;
        partial void OnStateProvinceChanging(global::System.String value);
        partial void OnStateProvinceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String CountryRegion
        {
            get
            {
                return _CountryRegion;
            }
            set
            {
                OnCountryRegionChanging(value);
                ReportPropertyChanging("CountryRegion");
                _CountryRegion = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("CountryRegion");
                OnCountryRegionChanged();
            }
        }
        private global::System.String _CountryRegion;
        partial void OnCountryRegionChanging(global::System.String value);
        partial void OnCountryRegionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String PostalCode
        {
            get
            {
                return _PostalCode;
            }
            set
            {
                OnPostalCodeChanging(value);
                ReportPropertyChanging("PostalCode");
                _PostalCode = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("PostalCode");
                OnPostalCodeChanged();
            }
        }
        private global::System.String _PostalCode;
        partial void OnPostalCodeChanging(global::System.String value);
        partial void OnPostalCodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_CustomerAddress_Address_AddressID", "CustomerAddress")]
        public EntityCollection<CustomerAddress> CustomerAddress
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<CustomerAddress>("AdventureWorksLT2008Model.FK_CustomerAddress_Address_AddressID", "CustomerAddress");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<CustomerAddress>("AdventureWorksLT2008Model.FK_CustomerAddress_Address_AddressID", "CustomerAddress", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Address_BillTo_AddressID", "SalesOrderHeader")]
        public EntityCollection<SalesOrderHeader> SalesOrderHeader
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_BillTo_AddressID", "SalesOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_BillTo_AddressID", "SalesOrderHeader", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Address_ShipTo_AddressID", "SalesOrderHeader")]
        public EntityCollection<SalesOrderHeader> SalesOrderHeader1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_ShipTo_AddressID", "SalesOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_ShipTo_AddressID", "SalesOrderHeader", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="BuildVersion")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class BuildVersion : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new BuildVersion object.
        /// </summary>
        /// <param name="systemInformationID">Initial value of the SystemInformationID property.</param>
        /// <param name="database_Version">Initial value of the Database_Version property.</param>
        /// <param name="versionDate">Initial value of the VersionDate property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static BuildVersion CreateBuildVersion(global::System.Byte systemInformationID, global::System.String database_Version, global::System.DateTime versionDate, global::System.DateTime modifiedDate)
        {
            BuildVersion buildVersion = new BuildVersion();
            buildVersion.SystemInformationID = systemInformationID;
            buildVersion.Database_Version = database_Version;
            buildVersion.VersionDate = versionDate;
            buildVersion.ModifiedDate = modifiedDate;
            return buildVersion;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte SystemInformationID
        {
            get
            {
                return _SystemInformationID;
            }
            set
            {
                if (_SystemInformationID != value)
                {
                    OnSystemInformationIDChanging(value);
                    ReportPropertyChanging("SystemInformationID");
                    _SystemInformationID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SystemInformationID");
                    OnSystemInformationIDChanged();
                }
            }
        }
        private global::System.Byte _SystemInformationID;
        partial void OnSystemInformationIDChanging(global::System.Byte value);
        partial void OnSystemInformationIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Database_Version
        {
            get
            {
                return _Database_Version;
            }
            set
            {
                if (_Database_Version != value)
                {
                    OnDatabase_VersionChanging(value);
                    ReportPropertyChanging("Database_Version");
                    _Database_Version = StructuralObject.SetValidValue(value, false);
                    ReportPropertyChanged("Database_Version");
                    OnDatabase_VersionChanged();
                }
            }
        }
        private global::System.String _Database_Version;
        partial void OnDatabase_VersionChanging(global::System.String value);
        partial void OnDatabase_VersionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime VersionDate
        {
            get
            {
                return _VersionDate;
            }
            set
            {
                if (_VersionDate != value)
                {
                    OnVersionDateChanging(value);
                    ReportPropertyChanging("VersionDate");
                    _VersionDate = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("VersionDate");
                    OnVersionDateChanged();
                }
            }
        }
        private global::System.DateTime _VersionDate;
        partial void OnVersionDateChanging(global::System.DateTime value);
        partial void OnVersionDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                if (_ModifiedDate != value)
                {
                    OnModifiedDateChanging(value);
                    ReportPropertyChanging("ModifiedDate");
                    _ModifiedDate = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ModifiedDate");
                    OnModifiedDateChanged();
                }
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="Customer")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Customer : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Customer object.
        /// </summary>
        /// <param name="customerID">Initial value of the CustomerID property.</param>
        /// <param name="nameStyle">Initial value of the NameStyle property.</param>
        /// <param name="firstName">Initial value of the FirstName property.</param>
        /// <param name="lastName">Initial value of the LastName property.</param>
        /// <param name="passwordHash">Initial value of the PasswordHash property.</param>
        /// <param name="passwordSalt">Initial value of the PasswordSalt property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static Customer CreateCustomer(global::System.Int32 customerID, global::System.Boolean nameStyle, global::System.String firstName, global::System.String lastName, global::System.String passwordHash, global::System.String passwordSalt, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Customer customer = new Customer();
            customer.CustomerID = customerID;
            customer.NameStyle = nameStyle;
            customer.FirstName = firstName;
            customer.LastName = lastName;
            customer.PasswordHash = passwordHash;
            customer.PasswordSalt = passwordSalt;
            customer.rowguid = rowguid;
            customer.ModifiedDate = modifiedDate;
            return customer;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CustomerID
        {
            get
            {
                return _CustomerID;
            }
            set
            {
                if (_CustomerID != value)
                {
                    OnCustomerIDChanging(value);
                    ReportPropertyChanging("CustomerID");
                    _CustomerID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CustomerID");
                    OnCustomerIDChanged();
                }
            }
        }
        private global::System.Int32 _CustomerID;
        partial void OnCustomerIDChanging(global::System.Int32 value);
        partial void OnCustomerIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean NameStyle
        {
            get
            {
                return _NameStyle;
            }
            set
            {
                OnNameStyleChanging(value);
                ReportPropertyChanging("NameStyle");
                _NameStyle = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("NameStyle");
                OnNameStyleChanged();
            }
        }
        private global::System.Boolean _NameStyle;
        partial void OnNameStyleChanging(global::System.Boolean value);
        partial void OnNameStyleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String FirstName
        {
            get
            {
                return _FirstName;
            }
            set
            {
                OnFirstNameChanging(value);
                ReportPropertyChanging("FirstName");
                _FirstName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("FirstName");
                OnFirstNameChanged();
            }
        }
        private global::System.String _FirstName;
        partial void OnFirstNameChanging(global::System.String value);
        partial void OnFirstNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String MiddleName
        {
            get
            {
                return _MiddleName;
            }
            set
            {
                OnMiddleNameChanging(value);
                ReportPropertyChanging("MiddleName");
                _MiddleName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("MiddleName");
                OnMiddleNameChanged();
            }
        }
        private global::System.String _MiddleName;
        partial void OnMiddleNameChanging(global::System.String value);
        partial void OnMiddleNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String LastName
        {
            get
            {
                return _LastName;
            }
            set
            {
                OnLastNameChanging(value);
                ReportPropertyChanging("LastName");
                _LastName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("LastName");
                OnLastNameChanged();
            }
        }
        private global::System.String _LastName;
        partial void OnLastNameChanging(global::System.String value);
        partial void OnLastNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Suffix
        {
            get
            {
                return _Suffix;
            }
            set
            {
                OnSuffixChanging(value);
                ReportPropertyChanging("Suffix");
                _Suffix = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Suffix");
                OnSuffixChanged();
            }
        }
        private global::System.String _Suffix;
        partial void OnSuffixChanging(global::System.String value);
        partial void OnSuffixChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String CompanyName
        {
            get
            {
                return _CompanyName;
            }
            set
            {
                OnCompanyNameChanging(value);
                ReportPropertyChanging("CompanyName");
                _CompanyName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CompanyName");
                OnCompanyNameChanged();
            }
        }
        private global::System.String _CompanyName;
        partial void OnCompanyNameChanging(global::System.String value);
        partial void OnCompanyNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String SalesPerson
        {
            get
            {
                return _SalesPerson;
            }
            set
            {
                OnSalesPersonChanging(value);
                ReportPropertyChanging("SalesPerson");
                _SalesPerson = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("SalesPerson");
                OnSalesPersonChanged();
            }
        }
        private global::System.String _SalesPerson;
        partial void OnSalesPersonChanging(global::System.String value);
        partial void OnSalesPersonChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String EmailAddress
        {
            get
            {
                return _EmailAddress;
            }
            set
            {
                OnEmailAddressChanging(value);
                ReportPropertyChanging("EmailAddress");
                _EmailAddress = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("EmailAddress");
                OnEmailAddressChanged();
            }
        }
        private global::System.String _EmailAddress;
        partial void OnEmailAddressChanging(global::System.String value);
        partial void OnEmailAddressChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Phone
        {
            get
            {
                return _Phone;
            }
            set
            {
                OnPhoneChanging(value);
                ReportPropertyChanging("Phone");
                _Phone = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Phone");
                OnPhoneChanged();
            }
        }
        private global::System.String _Phone;
        partial void OnPhoneChanging(global::System.String value);
        partial void OnPhoneChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String PasswordHash
        {
            get
            {
                return _PasswordHash;
            }
            set
            {
                OnPasswordHashChanging(value);
                ReportPropertyChanging("PasswordHash");
                _PasswordHash = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("PasswordHash");
                OnPasswordHashChanged();
            }
        }
        private global::System.String _PasswordHash;
        partial void OnPasswordHashChanging(global::System.String value);
        partial void OnPasswordHashChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String PasswordSalt
        {
            get
            {
                return _PasswordSalt;
            }
            set
            {
                OnPasswordSaltChanging(value);
                ReportPropertyChanging("PasswordSalt");
                _PasswordSalt = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("PasswordSalt");
                OnPasswordSaltChanged();
            }
        }
        private global::System.String _PasswordSalt;
        partial void OnPasswordSaltChanging(global::System.String value);
        partial void OnPasswordSaltChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

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

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="CustomerAddress")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class CustomerAddress : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new CustomerAddress object.
        /// </summary>
        /// <param name="customerID">Initial value of the CustomerID property.</param>
        /// <param name="addressID">Initial value of the AddressID property.</param>
        /// <param name="addressType">Initial value of the AddressType property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static CustomerAddress CreateCustomerAddress(global::System.Int32 customerID, global::System.Int32 addressID, global::System.String addressType, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            CustomerAddress customerAddress = new CustomerAddress();
            customerAddress.CustomerID = customerID;
            customerAddress.AddressID = addressID;
            customerAddress.AddressType = addressType;
            customerAddress.rowguid = rowguid;
            customerAddress.ModifiedDate = modifiedDate;
            return customerAddress;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CustomerID
        {
            get
            {
                return _CustomerID;
            }
            set
            {
                if (_CustomerID != value)
                {
                    OnCustomerIDChanging(value);
                    ReportPropertyChanging("CustomerID");
                    _CustomerID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CustomerID");
                    OnCustomerIDChanged();
                }
            }
        }
        private global::System.Int32 _CustomerID;
        partial void OnCustomerIDChanging(global::System.Int32 value);
        partial void OnCustomerIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 AddressID
        {
            get
            {
                return _AddressID;
            }
            set
            {
                if (_AddressID != value)
                {
                    OnAddressIDChanging(value);
                    ReportPropertyChanging("AddressID");
                    _AddressID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("AddressID");
                    OnAddressIDChanged();
                }
            }
        }
        private global::System.Int32 _AddressID;
        partial void OnAddressIDChanging(global::System.Int32 value);
        partial void OnAddressIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String AddressType
        {
            get
            {
                return _AddressType;
            }
            set
            {
                OnAddressTypeChanging(value);
                ReportPropertyChanging("AddressType");
                _AddressType = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("AddressType");
                OnAddressTypeChanged();
            }
        }
        private global::System.String _AddressType;
        partial void OnAddressTypeChanging(global::System.String value);
        partial void OnAddressTypeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_CustomerAddress_Address_AddressID", "Address")]
        public Address Address
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_CustomerAddress_Address_AddressID", "Address").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_CustomerAddress_Address_AddressID", "Address").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Address> AddressReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_CustomerAddress_Address_AddressID", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Address>("AdventureWorksLT2008Model.FK_CustomerAddress_Address_AddressID", "Address", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_CustomerAddress_Customer_CustomerID", "Customer")]
        public Customer Customer
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("AdventureWorksLT2008Model.FK_CustomerAddress_Customer_CustomerID", "Customer").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("AdventureWorksLT2008Model.FK_CustomerAddress_Customer_CustomerID", "Customer").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Customer> CustomerReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("AdventureWorksLT2008Model.FK_CustomerAddress_Customer_CustomerID", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Customer>("AdventureWorksLT2008Model.FK_CustomerAddress_Customer_CustomerID", "Customer", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="ErrorLog")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class ErrorLog : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new ErrorLog object.
        /// </summary>
        /// <param name="errorLogID">Initial value of the ErrorLogID property.</param>
        /// <param name="errorTime">Initial value of the ErrorTime property.</param>
        /// <param name="userName">Initial value of the UserName property.</param>
        /// <param name="errorNumber">Initial value of the ErrorNumber property.</param>
        /// <param name="errorMessage">Initial value of the ErrorMessage property.</param>
        public static ErrorLog CreateErrorLog(global::System.Int32 errorLogID, global::System.DateTime errorTime, global::System.String userName, global::System.Int32 errorNumber, global::System.String errorMessage)
        {
            ErrorLog errorLog = new ErrorLog();
            errorLog.ErrorLogID = errorLogID;
            errorLog.ErrorTime = errorTime;
            errorLog.UserName = userName;
            errorLog.ErrorNumber = errorNumber;
            errorLog.ErrorMessage = errorMessage;
            return errorLog;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ErrorLogID
        {
            get
            {
                return _ErrorLogID;
            }
            set
            {
                if (_ErrorLogID != value)
                {
                    OnErrorLogIDChanging(value);
                    ReportPropertyChanging("ErrorLogID");
                    _ErrorLogID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ErrorLogID");
                    OnErrorLogIDChanged();
                }
            }
        }
        private global::System.Int32 _ErrorLogID;
        partial void OnErrorLogIDChanging(global::System.Int32 value);
        partial void OnErrorLogIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ErrorTime
        {
            get
            {
                return _ErrorTime;
            }
            set
            {
                OnErrorTimeChanging(value);
                ReportPropertyChanging("ErrorTime");
                _ErrorTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ErrorTime");
                OnErrorTimeChanged();
            }
        }
        private global::System.DateTime _ErrorTime;
        partial void OnErrorTimeChanging(global::System.DateTime value);
        partial void OnErrorTimeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String UserName
        {
            get
            {
                return _UserName;
            }
            set
            {
                OnUserNameChanging(value);
                ReportPropertyChanging("UserName");
                _UserName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("UserName");
                OnUserNameChanged();
            }
        }
        private global::System.String _UserName;
        partial void OnUserNameChanging(global::System.String value);
        partial void OnUserNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ErrorNumber
        {
            get
            {
                return _ErrorNumber;
            }
            set
            {
                OnErrorNumberChanging(value);
                ReportPropertyChanging("ErrorNumber");
                _ErrorNumber = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ErrorNumber");
                OnErrorNumberChanged();
            }
        }
        private global::System.Int32 _ErrorNumber;
        partial void OnErrorNumberChanging(global::System.Int32 value);
        partial void OnErrorNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ErrorSeverity
        {
            get
            {
                return _ErrorSeverity;
            }
            set
            {
                OnErrorSeverityChanging(value);
                ReportPropertyChanging("ErrorSeverity");
                _ErrorSeverity = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ErrorSeverity");
                OnErrorSeverityChanged();
            }
        }
        private Nullable<global::System.Int32> _ErrorSeverity;
        partial void OnErrorSeverityChanging(Nullable<global::System.Int32> value);
        partial void OnErrorSeverityChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ErrorState
        {
            get
            {
                return _ErrorState;
            }
            set
            {
                OnErrorStateChanging(value);
                ReportPropertyChanging("ErrorState");
                _ErrorState = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ErrorState");
                OnErrorStateChanged();
            }
        }
        private Nullable<global::System.Int32> _ErrorState;
        partial void OnErrorStateChanging(Nullable<global::System.Int32> value);
        partial void OnErrorStateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ErrorProcedure
        {
            get
            {
                return _ErrorProcedure;
            }
            set
            {
                OnErrorProcedureChanging(value);
                ReportPropertyChanging("ErrorProcedure");
                _ErrorProcedure = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ErrorProcedure");
                OnErrorProcedureChanged();
            }
        }
        private global::System.String _ErrorProcedure;
        partial void OnErrorProcedureChanging(global::System.String value);
        partial void OnErrorProcedureChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ErrorLine
        {
            get
            {
                return _ErrorLine;
            }
            set
            {
                OnErrorLineChanging(value);
                ReportPropertyChanging("ErrorLine");
                _ErrorLine = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ErrorLine");
                OnErrorLineChanged();
            }
        }
        private Nullable<global::System.Int32> _ErrorLine;
        partial void OnErrorLineChanging(Nullable<global::System.Int32> value);
        partial void OnErrorLineChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String ErrorMessage
        {
            get
            {
                return _ErrorMessage;
            }
            set
            {
                OnErrorMessageChanging(value);
                ReportPropertyChanging("ErrorMessage");
                _ErrorMessage = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("ErrorMessage");
                OnErrorMessageChanged();
            }
        }
        private global::System.String _ErrorMessage;
        partial void OnErrorMessageChanging(global::System.String value);
        partial void OnErrorMessageChanged();

        #endregion
    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="Product")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Product : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Product object.
        /// </summary>
        /// <param name="productID">Initial value of the ProductID property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="productNumber">Initial value of the ProductNumber property.</param>
        /// <param name="standardCost">Initial value of the StandardCost property.</param>
        /// <param name="listPrice">Initial value of the ListPrice property.</param>
        /// <param name="sellStartDate">Initial value of the SellStartDate property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static Product CreateProduct(global::System.Int32 productID, global::System.String name, global::System.String productNumber, global::System.Decimal standardCost, global::System.Decimal listPrice, global::System.DateTime sellStartDate, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Product product = new Product();
            product.ProductID = productID;
            product.Name = name;
            product.ProductNumber = productNumber;
            product.StandardCost = standardCost;
            product.ListPrice = listPrice;
            product.SellStartDate = sellStartDate;
            product.rowguid = rowguid;
            product.ModifiedDate = modifiedDate;
            return product;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductID
        {
            get
            {
                return _ProductID;
            }
            set
            {
                if (_ProductID != value)
                {
                    OnProductIDChanging(value);
                    ReportPropertyChanging("ProductID");
                    _ProductID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductID");
                    OnProductIDChanged();
                }
            }
        }
        private global::System.Int32 _ProductID;
        partial void OnProductIDChanging(global::System.Int32 value);
        partial void OnProductIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String ProductNumber
        {
            get
            {
                return _ProductNumber;
            }
            set
            {
                OnProductNumberChanging(value);
                ReportPropertyChanging("ProductNumber");
                _ProductNumber = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("ProductNumber");
                OnProductNumberChanged();
            }
        }
        private global::System.String _ProductNumber;
        partial void OnProductNumberChanging(global::System.String value);
        partial void OnProductNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Color
        {
            get
            {
                return _Color;
            }
            set
            {
                OnColorChanging(value);
                ReportPropertyChanging("Color");
                _Color = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Color");
                OnColorChanged();
            }
        }
        private global::System.String _Color;
        partial void OnColorChanging(global::System.String value);
        partial void OnColorChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal StandardCost
        {
            get
            {
                return _StandardCost;
            }
            set
            {
                OnStandardCostChanging(value);
                ReportPropertyChanging("StandardCost");
                _StandardCost = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StandardCost");
                OnStandardCostChanged();
            }
        }
        private global::System.Decimal _StandardCost;
        partial void OnStandardCostChanging(global::System.Decimal value);
        partial void OnStandardCostChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal ListPrice
        {
            get
            {
                return _ListPrice;
            }
            set
            {
                OnListPriceChanging(value);
                ReportPropertyChanging("ListPrice");
                _ListPrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ListPrice");
                OnListPriceChanged();
            }
        }
        private global::System.Decimal _ListPrice;
        partial void OnListPriceChanging(global::System.Decimal value);
        partial void OnListPriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Size
        {
            get
            {
                return _Size;
            }
            set
            {
                OnSizeChanging(value);
                ReportPropertyChanging("Size");
                _Size = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Size");
                OnSizeChanged();
            }
        }
        private global::System.String _Size;
        partial void OnSizeChanging(global::System.String value);
        partial void OnSizeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> Weight
        {
            get
            {
                return _Weight;
            }
            set
            {
                OnWeightChanging(value);
                ReportPropertyChanging("Weight");
                _Weight = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Weight");
                OnWeightChanged();
            }
        }
        private Nullable<global::System.Decimal> _Weight;
        partial void OnWeightChanging(Nullable<global::System.Decimal> value);
        partial void OnWeightChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ProductCategoryID
        {
            get
            {
                return _ProductCategoryID;
            }
            set
            {
                OnProductCategoryIDChanging(value);
                ReportPropertyChanging("ProductCategoryID");
                _ProductCategoryID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ProductCategoryID");
                OnProductCategoryIDChanged();
            }
        }
        private Nullable<global::System.Int32> _ProductCategoryID;
        partial void OnProductCategoryIDChanging(Nullable<global::System.Int32> value);
        partial void OnProductCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ProductModelID
        {
            get
            {
                return _ProductModelID;
            }
            set
            {
                OnProductModelIDChanging(value);
                ReportPropertyChanging("ProductModelID");
                _ProductModelID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ProductModelID");
                OnProductModelIDChanged();
            }
        }
        private Nullable<global::System.Int32> _ProductModelID;
        partial void OnProductModelIDChanging(Nullable<global::System.Int32> value);
        partial void OnProductModelIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime SellStartDate
        {
            get
            {
                return _SellStartDate;
            }
            set
            {
                OnSellStartDateChanging(value);
                ReportPropertyChanging("SellStartDate");
                _SellStartDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SellStartDate");
                OnSellStartDateChanged();
            }
        }
        private global::System.DateTime _SellStartDate;
        partial void OnSellStartDateChanging(global::System.DateTime value);
        partial void OnSellStartDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> SellEndDate
        {
            get
            {
                return _SellEndDate;
            }
            set
            {
                OnSellEndDateChanging(value);
                ReportPropertyChanging("SellEndDate");
                _SellEndDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SellEndDate");
                OnSellEndDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _SellEndDate;
        partial void OnSellEndDateChanging(Nullable<global::System.DateTime> value);
        partial void OnSellEndDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> DiscontinuedDate
        {
            get
            {
                return _DiscontinuedDate;
            }
            set
            {
                OnDiscontinuedDateChanging(value);
                ReportPropertyChanging("DiscontinuedDate");
                _DiscontinuedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DiscontinuedDate");
                OnDiscontinuedDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _DiscontinuedDate;
        partial void OnDiscontinuedDateChanging(Nullable<global::System.DateTime> value);
        partial void OnDiscontinuedDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.Byte[] ThumbNailPhoto
        {
            get
            {
                return StructuralObject.GetValidValue(_ThumbNailPhoto);
            }
            set
            {
                OnThumbNailPhotoChanging(value);
                ReportPropertyChanging("ThumbNailPhoto");
                _ThumbNailPhoto = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ThumbNailPhoto");
                OnThumbNailPhotoChanged();
            }
        }
        private global::System.Byte[] _ThumbNailPhoto;
        partial void OnThumbNailPhotoChanging(global::System.Byte[] value);
        partial void OnThumbNailPhotoChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ThumbnailPhotoFileName
        {
            get
            {
                return _ThumbnailPhotoFileName;
            }
            set
            {
                OnThumbnailPhotoFileNameChanging(value);
                ReportPropertyChanging("ThumbnailPhotoFileName");
                _ThumbnailPhotoFileName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ThumbnailPhotoFileName");
                OnThumbnailPhotoFileNameChanged();
            }
        }
        private global::System.String _ThumbnailPhotoFileName;
        partial void OnThumbnailPhotoFileNameChanging(global::System.String value);
        partial void OnThumbnailPhotoFileNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_Product_ProductCategory_ProductCategoryID", "ProductCategory")]
        public ProductCategory ProductCategory
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_Product_ProductCategory_ProductCategoryID", "ProductCategory").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_Product_ProductCategory_ProductCategoryID", "ProductCategory").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<ProductCategory> ProductCategoryReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_Product_ProductCategory_ProductCategoryID", "ProductCategory");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_Product_ProductCategory_ProductCategoryID", "ProductCategory", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_Product_ProductModel_ProductModelID", "ProductModel")]
        public ProductModel ProductModel
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_Product_ProductModel_ProductModelID", "ProductModel").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_Product_ProductModel_ProductModelID", "ProductModel").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<ProductModel> ProductModelReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_Product_ProductModel_ProductModelID", "ProductModel");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_Product_ProductModel_ProductModelID", "ProductModel", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderDetail_Product_ProductID", "SalesOrderDetail")]
        public EntityCollection<SalesOrderDetail> SalesOrderDetail
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SalesOrderDetail>("AdventureWorksLT2008Model.FK_SalesOrderDetail_Product_ProductID", "SalesOrderDetail");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SalesOrderDetail>("AdventureWorksLT2008Model.FK_SalesOrderDetail_Product_ProductID", "SalesOrderDetail", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="ProductCategory")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class ProductCategory : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new ProductCategory object.
        /// </summary>
        /// <param name="productCategoryID">Initial value of the ProductCategoryID property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static ProductCategory CreateProductCategory(global::System.Int32 productCategoryID, global::System.String name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductCategory productCategory = new ProductCategory();
            productCategory.ProductCategoryID = productCategoryID;
            productCategory.Name = name;
            productCategory.rowguid = rowguid;
            productCategory.ModifiedDate = modifiedDate;
            return productCategory;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductCategoryID
        {
            get
            {
                return _ProductCategoryID;
            }
            set
            {
                if (_ProductCategoryID != value)
                {
                    OnProductCategoryIDChanging(value);
                    ReportPropertyChanging("ProductCategoryID");
                    _ProductCategoryID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductCategoryID");
                    OnProductCategoryIDChanged();
                }
            }
        }
        private global::System.Int32 _ProductCategoryID;
        partial void OnProductCategoryIDChanging(global::System.Int32 value);
        partial void OnProductCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ParentProductCategoryID
        {
            get
            {
                return _ParentProductCategoryID;
            }
            set
            {
                OnParentProductCategoryIDChanging(value);
                ReportPropertyChanging("ParentProductCategoryID");
                _ParentProductCategoryID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ParentProductCategoryID");
                OnParentProductCategoryIDChanged();
            }
        }
        private Nullable<global::System.Int32> _ParentProductCategoryID;
        partial void OnParentProductCategoryIDChanging(Nullable<global::System.Int32> value);
        partial void OnParentProductCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_Product_ProductCategory_ProductCategoryID", "Product")]
        public EntityCollection<Product> Product
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Product>("AdventureWorksLT2008Model.FK_Product_ProductCategory_ProductCategoryID", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Product>("AdventureWorksLT2008Model.FK_Product_ProductCategory_ProductCategoryID", "Product", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory1")]
        public EntityCollection<ProductCategory> ProductCategory1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<ProductCategory>("AdventureWorksLT2008Model.FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory1");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<ProductCategory>("AdventureWorksLT2008Model.FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory1", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory")]
        public ProductCategory ProductCategory2
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<ProductCategory> ProductCategory2Reference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ProductCategory>("AdventureWorksLT2008Model.FK_ProductCategory_ProductCategory_ParentProductCategoryID_ProductCategoryID", "ProductCategory", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="ProductDescription")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class ProductDescription : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new ProductDescription object.
        /// </summary>
        /// <param name="productDescriptionID">Initial value of the ProductDescriptionID property.</param>
        /// <param name="description">Initial value of the Description property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static ProductDescription CreateProductDescription(global::System.Int32 productDescriptionID, global::System.String description, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductDescription productDescription = new ProductDescription();
            productDescription.ProductDescriptionID = productDescriptionID;
            productDescription.Description = description;
            productDescription.rowguid = rowguid;
            productDescription.ModifiedDate = modifiedDate;
            return productDescription;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductDescriptionID
        {
            get
            {
                return _ProductDescriptionID;
            }
            set
            {
                if (_ProductDescriptionID != value)
                {
                    OnProductDescriptionIDChanging(value);
                    ReportPropertyChanging("ProductDescriptionID");
                    _ProductDescriptionID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductDescriptionID");
                    OnProductDescriptionIDChanged();
                }
            }
        }
        private global::System.Int32 _ProductDescriptionID;
        partial void OnProductDescriptionIDChanging(global::System.Int32 value);
        partial void OnProductDescriptionIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, false);
                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=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

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

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="ProductModel")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class ProductModel : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new ProductModel object.
        /// </summary>
        /// <param name="productModelID">Initial value of the ProductModelID property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static ProductModel CreateProductModel(global::System.Int32 productModelID, global::System.String name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductModel productModel = new ProductModel();
            productModel.ProductModelID = productModelID;
            productModel.Name = name;
            productModel.rowguid = rowguid;
            productModel.ModifiedDate = modifiedDate;
            return productModel;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductModelID
        {
            get
            {
                return _ProductModelID;
            }
            set
            {
                if (_ProductModelID != value)
                {
                    OnProductModelIDChanging(value);
                    ReportPropertyChanging("ProductModelID");
                    _ProductModelID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductModelID");
                    OnProductModelIDChanged();
                }
            }
        }
        private global::System.Int32 _ProductModelID;
        partial void OnProductModelIDChanging(global::System.Int32 value);
        partial void OnProductModelIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String CatalogDescription
        {
            get
            {
                return _CatalogDescription;
            }
            set
            {
                OnCatalogDescriptionChanging(value);
                ReportPropertyChanging("CatalogDescription");
                _CatalogDescription = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CatalogDescription");
                OnCatalogDescriptionChanged();
            }
        }
        private global::System.String _CatalogDescription;
        partial void OnCatalogDescriptionChanging(global::System.String value);
        partial void OnCatalogDescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

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

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="ProductModelProductDescription")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class ProductModelProductDescription : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new ProductModelProductDescription object.
        /// </summary>
        /// <param name="productModelID">Initial value of the ProductModelID property.</param>
        /// <param name="productDescriptionID">Initial value of the ProductDescriptionID property.</param>
        /// <param name="culture">Initial value of the Culture property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static ProductModelProductDescription CreateProductModelProductDescription(global::System.Int32 productModelID, global::System.Int32 productDescriptionID, global::System.String culture, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductModelProductDescription productModelProductDescription = new ProductModelProductDescription();
            productModelProductDescription.ProductModelID = productModelID;
            productModelProductDescription.ProductDescriptionID = productDescriptionID;
            productModelProductDescription.Culture = culture;
            productModelProductDescription.rowguid = rowguid;
            productModelProductDescription.ModifiedDate = modifiedDate;
            return productModelProductDescription;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductModelID
        {
            get
            {
                return _ProductModelID;
            }
            set
            {
                if (_ProductModelID != value)
                {
                    OnProductModelIDChanging(value);
                    ReportPropertyChanging("ProductModelID");
                    _ProductModelID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductModelID");
                    OnProductModelIDChanged();
                }
            }
        }
        private global::System.Int32 _ProductModelID;
        partial void OnProductModelIDChanging(global::System.Int32 value);
        partial void OnProductModelIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductDescriptionID
        {
            get
            {
                return _ProductDescriptionID;
            }
            set
            {
                if (_ProductDescriptionID != value)
                {
                    OnProductDescriptionIDChanging(value);
                    ReportPropertyChanging("ProductDescriptionID");
                    _ProductDescriptionID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductDescriptionID");
                    OnProductDescriptionIDChanged();
                }
            }
        }
        private global::System.Int32 _ProductDescriptionID;
        partial void OnProductDescriptionIDChanging(global::System.Int32 value);
        partial void OnProductDescriptionIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Culture
        {
            get
            {
                return _Culture;
            }
            set
            {
                if (_Culture != value)
                {
                    OnCultureChanging(value);
                    ReportPropertyChanging("Culture");
                    _Culture = StructuralObject.SetValidValue(value, false);
                    ReportPropertyChanged("Culture");
                    OnCultureChanged();
                }
            }
        }
        private global::System.String _Culture;
        partial void OnCultureChanging(global::System.String value);
        partial void OnCultureChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_ProductModelProductDescription_ProductDescription_ProductDescriptionID", "ProductDescription")]
        public ProductDescription ProductDescription
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductDescription>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductDescription_ProductDescriptionID", "ProductDescription").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductDescription>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductDescription_ProductDescriptionID", "ProductDescription").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<ProductDescription> ProductDescriptionReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductDescription>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductDescription_ProductDescriptionID", "ProductDescription");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ProductDescription>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductDescription_ProductDescriptionID", "ProductDescription", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_ProductModelProductDescription_ProductModel_ProductModelID", "ProductModel")]
        public ProductModel ProductModel
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductModel_ProductModelID", "ProductModel").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductModel_ProductModelID", "ProductModel").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<ProductModel> ProductModelReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductModel_ProductModelID", "ProductModel");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ProductModel>("AdventureWorksLT2008Model.FK_ProductModelProductDescription_ProductModel_ProductModelID", "ProductModel", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="SalesOrderDetail")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class SalesOrderDetail : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new SalesOrderDetail object.
        /// </summary>
        /// <param name="salesOrderID">Initial value of the SalesOrderID property.</param>
        /// <param name="salesOrderDetailID">Initial value of the SalesOrderDetailID property.</param>
        /// <param name="orderQty">Initial value of the OrderQty property.</param>
        /// <param name="productID">Initial value of the ProductID property.</param>
        /// <param name="unitPrice">Initial value of the UnitPrice property.</param>
        /// <param name="unitPriceDiscount">Initial value of the UnitPriceDiscount property.</param>
        /// <param name="lineTotal">Initial value of the LineTotal property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static SalesOrderDetail CreateSalesOrderDetail(global::System.Int32 salesOrderID, global::System.Int32 salesOrderDetailID, global::System.Int16 orderQty, global::System.Int32 productID, global::System.Decimal unitPrice, global::System.Decimal unitPriceDiscount, global::System.Decimal lineTotal, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesOrderDetail salesOrderDetail = new SalesOrderDetail();
            salesOrderDetail.SalesOrderID = salesOrderID;
            salesOrderDetail.SalesOrderDetailID = salesOrderDetailID;
            salesOrderDetail.OrderQty = orderQty;
            salesOrderDetail.ProductID = productID;
            salesOrderDetail.UnitPrice = unitPrice;
            salesOrderDetail.UnitPriceDiscount = unitPriceDiscount;
            salesOrderDetail.LineTotal = lineTotal;
            salesOrderDetail.rowguid = rowguid;
            salesOrderDetail.ModifiedDate = modifiedDate;
            return salesOrderDetail;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 SalesOrderID
        {
            get
            {
                return _SalesOrderID;
            }
            set
            {
                if (_SalesOrderID != value)
                {
                    OnSalesOrderIDChanging(value);
                    ReportPropertyChanging("SalesOrderID");
                    _SalesOrderID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SalesOrderID");
                    OnSalesOrderIDChanged();
                }
            }
        }
        private global::System.Int32 _SalesOrderID;
        partial void OnSalesOrderIDChanging(global::System.Int32 value);
        partial void OnSalesOrderIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 SalesOrderDetailID
        {
            get
            {
                return _SalesOrderDetailID;
            }
            set
            {
                if (_SalesOrderDetailID != value)
                {
                    OnSalesOrderDetailIDChanging(value);
                    ReportPropertyChanging("SalesOrderDetailID");
                    _SalesOrderDetailID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SalesOrderDetailID");
                    OnSalesOrderDetailIDChanged();
                }
            }
        }
        private global::System.Int32 _SalesOrderDetailID;
        partial void OnSalesOrderDetailIDChanging(global::System.Int32 value);
        partial void OnSalesOrderDetailIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int16 OrderQty
        {
            get
            {
                return _OrderQty;
            }
            set
            {
                OnOrderQtyChanging(value);
                ReportPropertyChanging("OrderQty");
                _OrderQty = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("OrderQty");
                OnOrderQtyChanged();
            }
        }
        private global::System.Int16 _OrderQty;
        partial void OnOrderQtyChanging(global::System.Int16 value);
        partial void OnOrderQtyChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductID
        {
            get
            {
                return _ProductID;
            }
            set
            {
                OnProductIDChanging(value);
                ReportPropertyChanging("ProductID");
                _ProductID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ProductID");
                OnProductIDChanged();
            }
        }
        private global::System.Int32 _ProductID;
        partial void OnProductIDChanging(global::System.Int32 value);
        partial void OnProductIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal UnitPrice
        {
            get
            {
                return _UnitPrice;
            }
            set
            {
                OnUnitPriceChanging(value);
                ReportPropertyChanging("UnitPrice");
                _UnitPrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UnitPrice");
                OnUnitPriceChanged();
            }
        }
        private global::System.Decimal _UnitPrice;
        partial void OnUnitPriceChanging(global::System.Decimal value);
        partial void OnUnitPriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal UnitPriceDiscount
        {
            get
            {
                return _UnitPriceDiscount;
            }
            set
            {
                OnUnitPriceDiscountChanging(value);
                ReportPropertyChanging("UnitPriceDiscount");
                _UnitPriceDiscount = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UnitPriceDiscount");
                OnUnitPriceDiscountChanged();
            }
        }
        private global::System.Decimal _UnitPriceDiscount;
        partial void OnUnitPriceDiscountChanging(global::System.Decimal value);
        partial void OnUnitPriceDiscountChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal LineTotal
        {
            get
            {
                return _LineTotal;
            }
            set
            {
                OnLineTotalChanging(value);
                ReportPropertyChanging("LineTotal");
                _LineTotal = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LineTotal");
                OnLineTotalChanged();
            }
        }
        private global::System.Decimal _LineTotal;
        partial void OnLineTotalChanging(global::System.Decimal value);
        partial void OnLineTotalChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderDetail_Product_ProductID", "Product")]
        public Product Product
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("AdventureWorksLT2008Model.FK_SalesOrderDetail_Product_ProductID", "Product").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("AdventureWorksLT2008Model.FK_SalesOrderDetail_Product_ProductID", "Product").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Product> ProductReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("AdventureWorksLT2008Model.FK_SalesOrderDetail_Product_ProductID", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Product>("AdventureWorksLT2008Model.FK_SalesOrderDetail_Product_ProductID", "Product", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader")]
        public SalesOrderHeader SalesOrderHeader
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<SalesOrderHeader> SalesOrderHeaderReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<SalesOrderHeader>("AdventureWorksLT2008Model.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderHeader", value);
                }
            }
        }

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="AdventureWorksLT2008Model", Name="SalesOrderHeader")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class SalesOrderHeader : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new SalesOrderHeader object.
        /// </summary>
        /// <param name="salesOrderID">Initial value of the SalesOrderID property.</param>
        /// <param name="revisionNumber">Initial value of the RevisionNumber property.</param>
        /// <param name="orderDate">Initial value of the OrderDate property.</param>
        /// <param name="dueDate">Initial value of the DueDate property.</param>
        /// <param name="status">Initial value of the Status property.</param>
        /// <param name="onlineOrderFlag">Initial value of the OnlineOrderFlag property.</param>
        /// <param name="salesOrderNumber">Initial value of the SalesOrderNumber property.</param>
        /// <param name="customerID">Initial value of the CustomerID property.</param>
        /// <param name="shipMethod">Initial value of the ShipMethod property.</param>
        /// <param name="subTotal">Initial value of the SubTotal property.</param>
        /// <param name="taxAmt">Initial value of the TaxAmt property.</param>
        /// <param name="freight">Initial value of the Freight property.</param>
        /// <param name="totalDue">Initial value of the TotalDue property.</param>
        /// <param name="rowguid">Initial value of the rowguid property.</param>
        /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
        public static SalesOrderHeader CreateSalesOrderHeader(global::System.Int32 salesOrderID, global::System.Byte revisionNumber, global::System.DateTime orderDate, global::System.DateTime dueDate, global::System.Byte status, global::System.Boolean onlineOrderFlag, global::System.String salesOrderNumber, global::System.Int32 customerID, global::System.String shipMethod, global::System.Decimal subTotal, global::System.Decimal taxAmt, global::System.Decimal freight, global::System.Decimal totalDue, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesOrderHeader salesOrderHeader = new SalesOrderHeader();
            salesOrderHeader.SalesOrderID = salesOrderID;
            salesOrderHeader.RevisionNumber = revisionNumber;
            salesOrderHeader.OrderDate = orderDate;
            salesOrderHeader.DueDate = dueDate;
            salesOrderHeader.Status = status;
            salesOrderHeader.OnlineOrderFlag = onlineOrderFlag;
            salesOrderHeader.SalesOrderNumber = salesOrderNumber;
            salesOrderHeader.CustomerID = customerID;
            salesOrderHeader.ShipMethod = shipMethod;
            salesOrderHeader.SubTotal = subTotal;
            salesOrderHeader.TaxAmt = taxAmt;
            salesOrderHeader.Freight = freight;
            salesOrderHeader.TotalDue = totalDue;
            salesOrderHeader.rowguid = rowguid;
            salesOrderHeader.ModifiedDate = modifiedDate;
            return salesOrderHeader;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 SalesOrderID
        {
            get
            {
                return _SalesOrderID;
            }
            set
            {
                if (_SalesOrderID != value)
                {
                    OnSalesOrderIDChanging(value);
                    ReportPropertyChanging("SalesOrderID");
                    _SalesOrderID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SalesOrderID");
                    OnSalesOrderIDChanged();
                }
            }
        }
        private global::System.Int32 _SalesOrderID;
        partial void OnSalesOrderIDChanging(global::System.Int32 value);
        partial void OnSalesOrderIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte RevisionNumber
        {
            get
            {
                return _RevisionNumber;
            }
            set
            {
                OnRevisionNumberChanging(value);
                ReportPropertyChanging("RevisionNumber");
                _RevisionNumber = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RevisionNumber");
                OnRevisionNumberChanged();
            }
        }
        private global::System.Byte _RevisionNumber;
        partial void OnRevisionNumberChanging(global::System.Byte value);
        partial void OnRevisionNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime OrderDate
        {
            get
            {
                return _OrderDate;
            }
            set
            {
                OnOrderDateChanging(value);
                ReportPropertyChanging("OrderDate");
                _OrderDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("OrderDate");
                OnOrderDateChanged();
            }
        }
        private global::System.DateTime _OrderDate;
        partial void OnOrderDateChanging(global::System.DateTime value);
        partial void OnOrderDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime DueDate
        {
            get
            {
                return _DueDate;
            }
            set
            {
                OnDueDateChanging(value);
                ReportPropertyChanging("DueDate");
                _DueDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DueDate");
                OnDueDateChanged();
            }
        }
        private global::System.DateTime _DueDate;
        partial void OnDueDateChanging(global::System.DateTime value);
        partial void OnDueDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> ShipDate
        {
            get
            {
                return _ShipDate;
            }
            set
            {
                OnShipDateChanging(value);
                ReportPropertyChanging("ShipDate");
                _ShipDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ShipDate");
                OnShipDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _ShipDate;
        partial void OnShipDateChanging(Nullable<global::System.DateTime> value);
        partial void OnShipDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte Status
        {
            get
            {
                return _Status;
            }
            set
            {
                OnStatusChanging(value);
                ReportPropertyChanging("Status");
                _Status = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Status");
                OnStatusChanged();
            }
        }
        private global::System.Byte _Status;
        partial void OnStatusChanging(global::System.Byte value);
        partial void OnStatusChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean OnlineOrderFlag
        {
            get
            {
                return _OnlineOrderFlag;
            }
            set
            {
                OnOnlineOrderFlagChanging(value);
                ReportPropertyChanging("OnlineOrderFlag");
                _OnlineOrderFlag = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("OnlineOrderFlag");
                OnOnlineOrderFlagChanged();
            }
        }
        private global::System.Boolean _OnlineOrderFlag;
        partial void OnOnlineOrderFlagChanging(global::System.Boolean value);
        partial void OnOnlineOrderFlagChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String SalesOrderNumber
        {
            get
            {
                return _SalesOrderNumber;
            }
            set
            {
                OnSalesOrderNumberChanging(value);
                ReportPropertyChanging("SalesOrderNumber");
                _SalesOrderNumber = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("SalesOrderNumber");
                OnSalesOrderNumberChanged();
            }
        }
        private global::System.String _SalesOrderNumber;
        partial void OnSalesOrderNumberChanging(global::System.String value);
        partial void OnSalesOrderNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String PurchaseOrderNumber
        {
            get
            {
                return _PurchaseOrderNumber;
            }
            set
            {
                OnPurchaseOrderNumberChanging(value);
                ReportPropertyChanging("PurchaseOrderNumber");
                _PurchaseOrderNumber = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("PurchaseOrderNumber");
                OnPurchaseOrderNumberChanged();
            }
        }
        private global::System.String _PurchaseOrderNumber;
        partial void OnPurchaseOrderNumberChanging(global::System.String value);
        partial void OnPurchaseOrderNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String AccountNumber
        {
            get
            {
                return _AccountNumber;
            }
            set
            {
                OnAccountNumberChanging(value);
                ReportPropertyChanging("AccountNumber");
                _AccountNumber = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("AccountNumber");
                OnAccountNumberChanged();
            }
        }
        private global::System.String _AccountNumber;
        partial void OnAccountNumberChanging(global::System.String value);
        partial void OnAccountNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CustomerID
        {
            get
            {
                return _CustomerID;
            }
            set
            {
                OnCustomerIDChanging(value);
                ReportPropertyChanging("CustomerID");
                _CustomerID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CustomerID");
                OnCustomerIDChanged();
            }
        }
        private global::System.Int32 _CustomerID;
        partial void OnCustomerIDChanging(global::System.Int32 value);
        partial void OnCustomerIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ShipToAddressID
        {
            get
            {
                return _ShipToAddressID;
            }
            set
            {
                OnShipToAddressIDChanging(value);
                ReportPropertyChanging("ShipToAddressID");
                _ShipToAddressID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ShipToAddressID");
                OnShipToAddressIDChanged();
            }
        }
        private Nullable<global::System.Int32> _ShipToAddressID;
        partial void OnShipToAddressIDChanging(Nullable<global::System.Int32> value);
        partial void OnShipToAddressIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> BillToAddressID
        {
            get
            {
                return _BillToAddressID;
            }
            set
            {
                OnBillToAddressIDChanging(value);
                ReportPropertyChanging("BillToAddressID");
                _BillToAddressID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("BillToAddressID");
                OnBillToAddressIDChanged();
            }
        }
        private Nullable<global::System.Int32> _BillToAddressID;
        partial void OnBillToAddressIDChanging(Nullable<global::System.Int32> value);
        partial void OnBillToAddressIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String ShipMethod
        {
            get
            {
                return _ShipMethod;
            }
            set
            {
                OnShipMethodChanging(value);
                ReportPropertyChanging("ShipMethod");
                _ShipMethod = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("ShipMethod");
                OnShipMethodChanged();
            }
        }
        private global::System.String _ShipMethod;
        partial void OnShipMethodChanging(global::System.String value);
        partial void OnShipMethodChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String CreditCardApprovalCode
        {
            get
            {
                return _CreditCardApprovalCode;
            }
            set
            {
                OnCreditCardApprovalCodeChanging(value);
                ReportPropertyChanging("CreditCardApprovalCode");
                _CreditCardApprovalCode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CreditCardApprovalCode");
                OnCreditCardApprovalCodeChanged();
            }
        }
        private global::System.String _CreditCardApprovalCode;
        partial void OnCreditCardApprovalCodeChanging(global::System.String value);
        partial void OnCreditCardApprovalCodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal SubTotal
        {
            get
            {
                return _SubTotal;
            }
            set
            {
                OnSubTotalChanging(value);
                ReportPropertyChanging("SubTotal");
                _SubTotal = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SubTotal");
                OnSubTotalChanged();
            }
        }
        private global::System.Decimal _SubTotal;
        partial void OnSubTotalChanging(global::System.Decimal value);
        partial void OnSubTotalChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal TaxAmt
        {
            get
            {
                return _TaxAmt;
            }
            set
            {
                OnTaxAmtChanging(value);
                ReportPropertyChanging("TaxAmt");
                _TaxAmt = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("TaxAmt");
                OnTaxAmtChanged();
            }
        }
        private global::System.Decimal _TaxAmt;
        partial void OnTaxAmtChanging(global::System.Decimal value);
        partial void OnTaxAmtChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal Freight
        {
            get
            {
                return _Freight;
            }
            set
            {
                OnFreightChanging(value);
                ReportPropertyChanging("Freight");
                _Freight = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Freight");
                OnFreightChanged();
            }
        }
        private global::System.Decimal _Freight;
        partial void OnFreightChanging(global::System.Decimal value);
        partial void OnFreightChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal TotalDue
        {
            get
            {
                return _TotalDue;
            }
            set
            {
                OnTotalDueChanging(value);
                ReportPropertyChanging("TotalDue");
                _TotalDue = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("TotalDue");
                OnTotalDueChanged();
            }
        }
        private global::System.Decimal _TotalDue;
        partial void OnTotalDueChanging(global::System.Decimal value);
        partial void OnTotalDueChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Comment
        {
            get
            {
                return _Comment;
            }
            set
            {
                OnCommentChanging(value);
                ReportPropertyChanging("Comment");
                _Comment = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Comment");
                OnCommentChanged();
            }
        }
        private global::System.String _Comment;
        partial void OnCommentChanging(global::System.String value);
        partial void OnCommentChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid rowguid
        {
            get
            {
                return _rowguid;
            }
            set
            {
                OnrowguidChanging(value);
                ReportPropertyChanging("rowguid");
                _rowguid = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("rowguid");
                OnrowguidChanged();
            }
        }
        private global::System.Guid _rowguid;
        partial void OnrowguidChanging(global::System.Guid value);
        partial void OnrowguidChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return _ModifiedDate;
            }
            set
            {
                OnModifiedDateChanging(value);
                ReportPropertyChanging("ModifiedDate");
                _ModifiedDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ModifiedDate");
                OnModifiedDateChanged();
            }
        }
        private global::System.DateTime _ModifiedDate;
        partial void OnModifiedDateChanging(global::System.DateTime value);
        partial void OnModifiedDateChanged();

        #endregion
    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Address_BillTo_AddressID", "Address")]
        public Address Address
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_BillTo_AddressID", "Address").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_BillTo_AddressID", "Address").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Address> AddressReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_BillTo_AddressID", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_BillTo_AddressID", "Address", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Address_ShipTo_AddressID", "Address")]
        public Address Address1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_ShipTo_AddressID", "Address").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_ShipTo_AddressID", "Address").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Address> Address1Reference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_ShipTo_AddressID", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Address>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Address_ShipTo_AddressID", "Address", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderHeader_Customer_CustomerID", "Customer")]
        public Customer Customer
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Customer_CustomerID", "Customer").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Customer_CustomerID", "Customer").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Customer> CustomerReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Customer_CustomerID", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Customer>("AdventureWorksLT2008Model.FK_SalesOrderHeader_Customer_CustomerID", "Customer", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("AdventureWorksLT2008Model", "FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderDetail")]
        public EntityCollection<SalesOrderDetail> SalesOrderDetail
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SalesOrderDetail>("AdventureWorksLT2008Model.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderDetail");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SalesOrderDetail>("AdventureWorksLT2008Model.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", "SalesOrderDetail", value);
                }
            }
        }

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

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String name
        {
            get
            {
                return _name;
            }
            set
            {
                OnnameChanging(value);
                ReportPropertyChanging("name");
                _name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("name");
                OnnameChanged();
            }
        }
        private global::System.String _name;
        partial void OnnameChanging(global::System.String value);
        partial void OnnameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 principal_id
        {
            get
            {
                return _principal_id;
            }
            set
            {
                Onprincipal_idChanging(value);
                ReportPropertyChanging("principal_id");
                _principal_id = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("principal_id");
                Onprincipal_idChanged();
            }
        }
        private global::System.Int32 _principal_id;
        partial void Onprincipal_idChanging(global::System.Int32 value);
        partial void Onprincipal_idChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 diagram_id
        {
            get
            {
                return _diagram_id;
            }
            set
            {
                if (_diagram_id != value)
                {
                    Ondiagram_idChanging(value);
                    ReportPropertyChanging("diagram_id");
                    _diagram_id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("diagram_id");
                    Ondiagram_idChanged();
                }
            }
        }
        private global::System.Int32 _diagram_id;
        partial void Ondiagram_idChanging(global::System.Int32 value);
        partial void Ondiagram_idChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> version
        {
            get
            {
                return _version;
            }
            set
            {
                OnversionChanging(value);
                ReportPropertyChanging("version");
                _version = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("version");
                OnversionChanged();
            }
        }
        private Nullable<global::System.Int32> _version;
        partial void OnversionChanging(Nullable<global::System.Int32> value);
        partial void OnversionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.Byte[] definition
        {
            get
            {
                return StructuralObject.GetValidValue(_definition);
            }
            set
            {
                OndefinitionChanging(value);
                ReportPropertyChanging("definition");
                _definition = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("definition");
                OndefinitionChanged();
            }
        }
        private global::System.Byte[] _definition;
        partial void OndefinitionChanging(global::System.Byte[] value);
        partial void OndefinitionChanged();

        #endregion
    
    }

    #endregion
    
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ernesto Herrera
Web Developer Sigo S.A.
Venezuela Venezuela
Ernesto Herrera is a Senior Developer, Architect with more than 12 years experience, actually working with Silverlight Line-of-Bussiness Applications, he holds a MCTS Web Application 2.0 Certification, and have a wide experience with sql server since the 6.5 version, on his free time he likes to play tennis with his wife,kids and friends, also enjoy playing Wii with his sons, he works at Sigo S.A., a retail business located at Margarita Island, Venezuela.
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150414.1 | Last Updated 28 Jul 2010
Article Copyright 2010 by Ernesto Herrera
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid