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

// Original file name:
// Generation date: 04.10.2016 12:07:05
namespace Binding.DemoODataService
{
    
    /// <summary>
    /// There are no comments for DemoService in the schema.
    /// </summary>
    public partial class DemoService : global::System.Data.Services.Client.DataServiceContext
    {
        /// <summary>
        /// Initialize a new DemoService object.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public DemoService(global::System.Uri serviceRoot) : 
                base(serviceRoot, global::System.Data.Services.Common.DataServiceProtocolVersion.V3)
        {
            this.ResolveName = new global::System.Func<global::System.Type, string>(this.ResolveNameFromType);
            this.ResolveType = new global::System.Func<string, global::System.Type>(this.ResolveTypeFromName);
            this.OnContextCreated();
            this.Format.LoadServiceModel = GeneratedEdmModel.GetInstance;
        }
        partial void OnContextCreated();
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected global::System.Type ResolveTypeFromName(string typeName)
        {
            global::System.Type resolvedType = this.DefaultResolveType(typeName, "ODataDemo", "Binding.DemoODataService");
            if ((resolvedType != null))
            {
                return resolvedType;
            }
            return null;
        }
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected string ResolveNameFromType(global::System.Type clientType)
        {
            if (clientType.Namespace.Equals("Binding.DemoODataService", global::System.StringComparison.Ordinal))
            {
                return string.Concat("ODataDemo.", clientType.Name);
            }
            return clientType.FullName;
        }
        /// <summary>
        /// There are no comments for Products in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Product> Products
        {
            get
            {
                if ((this._Products == null))
                {
                    this._Products = base.CreateQuery<Product>("Products");
                }
                return this._Products;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Product> _Products;
        /// <summary>
        /// There are no comments for ProductDetails in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<ProductDetail> ProductDetails
        {
            get
            {
                if ((this._ProductDetails == null))
                {
                    this._ProductDetails = base.CreateQuery<ProductDetail>("ProductDetails");
                }
                return this._ProductDetails;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<ProductDetail> _ProductDetails;
        /// <summary>
        /// There are no comments for Categories in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Category> Categories
        {
            get
            {
                if ((this._Categories == null))
                {
                    this._Categories = base.CreateQuery<Category>("Categories");
                }
                return this._Categories;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Category> _Categories;
        /// <summary>
        /// There are no comments for Suppliers in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Supplier> Suppliers
        {
            get
            {
                if ((this._Suppliers == null))
                {
                    this._Suppliers = base.CreateQuery<Supplier>("Suppliers");
                }
                return this._Suppliers;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Supplier> _Suppliers;
        /// <summary>
        /// There are no comments for Persons in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Person> Persons
        {
            get
            {
                if ((this._Persons == null))
                {
                    this._Persons = base.CreateQuery<Person>("Persons");
                }
                return this._Persons;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Person> _Persons;
        /// <summary>
        /// There are no comments for PersonDetails in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<PersonDetail> PersonDetails
        {
            get
            {
                if ((this._PersonDetails == null))
                {
                    this._PersonDetails = base.CreateQuery<PersonDetail>("PersonDetails");
                }
                return this._PersonDetails;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<PersonDetail> _PersonDetails;
        /// <summary>
        /// There are no comments for Advertisements in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Advertisement> Advertisements
        {
            get
            {
                if ((this._Advertisements == null))
                {
                    this._Advertisements = base.CreateQuery<Advertisement>("Advertisements");
                }
                return this._Advertisements;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Advertisement> _Advertisements;
        /// <summary>
        /// There are no comments for Products in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToProducts(Product product)
        {
            base.AddObject("Products", product);
        }
        /// <summary>
        /// There are no comments for ProductDetails in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToProductDetails(ProductDetail productDetail)
        {
            base.AddObject("ProductDetails", productDetail);
        }
        /// <summary>
        /// There are no comments for Categories in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToCategories(Category category)
        {
            base.AddObject("Categories", category);
        }
        /// <summary>
        /// There are no comments for Suppliers in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToSuppliers(Supplier supplier)
        {
            base.AddObject("Suppliers", supplier);
        }
        /// <summary>
        /// There are no comments for Persons in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToPersons(Person person)
        {
            base.AddObject("Persons", person);
        }
        /// <summary>
        /// There are no comments for PersonDetails in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToPersonDetails(PersonDetail personDetail)
        {
            base.AddObject("PersonDetails", personDetail);
        }
        /// <summary>
        /// There are no comments for Advertisements in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToAdvertisements(Advertisement advertisement)
        {
            base.AddObject("Advertisements", advertisement);
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private abstract class GeneratedEdmModel
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static global::Microsoft.Data.Edm.IEdmModel ParsedModel = LoadModelFromString();
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private const string ModelPart0 = "<edmx:Edmx Version=\"1.0\" xmlns:edmx=\"http://schemas.microsoft.com/ado/2007/06/edm" +
                "x\"><edmx:DataServices m:DataServiceVersion=\"3.0\" m:MaxDataServiceVersion=\"3.0\" x" +
                "mlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><Schema " +
                "Namespace=\"ODataDemo\" xmlns=\"http://schemas.microsoft.com/ado/2009/11/edm\"><Enti" +
                "tyType Name=\"Product\"><Key><PropertyRef Name=\"ID\" /></Key><Property Name=\"ID\" Ty" +
                "pe=\"Edm.Int32\" Nullable=\"false\" /><Property Name=\"Name\" Type=\"Edm.String\" m:FC_T" +
                "argetPath=\"SyndicationTitle\" m:FC_ContentKind=\"text\" m:FC_KeepInContent=\"false\" " +
                "/><Property Name=\"Description\" Type=\"Edm.String\" m:FC_TargetPath=\"SyndicationSum" +
                "mary\" m:FC_ContentKind=\"text\" m:FC_KeepInContent=\"false\" /><Property Name=\"Relea" +
                "seDate\" Type=\"Edm.DateTime\" Nullable=\"false\" /><Property Name=\"DiscontinuedDate\"" +
                " Type=\"Edm.DateTime\" /><Property Name=\"Rating\" Type=\"Edm.Int16\" Nullable=\"false\"" +
                " /><Property Name=\"Price\" Type=\"Edm.Double\" Nullable=\"false\" /><NavigationProper" +
                "ty Name=\"Categories\" Relationship=\"ODataDemo.Product_Categories_Category_Product" +
                "s\" ToRole=\"Category_Products\" FromRole=\"Product_Categories\" /><NavigationPropert" +
                "y Name=\"Supplier\" Relationship=\"ODataDemo.Product_Supplier_Supplier_Products\" To" +
                "Role=\"Supplier_Products\" FromRole=\"Product_Supplier\" /><NavigationProperty Name=" +
                "\"ProductDetail\" Relationship=\"ODataDemo.Product_ProductDetail_ProductDetail_Prod" +
                "uct\" ToRole=\"ProductDetail_Product\" FromRole=\"Product_ProductDetail\" /></EntityT" +
                "ype><EntityType Name=\"FeaturedProduct\" BaseType=\"ODataDemo.Product\"><NavigationP" +
                "roperty Name=\"Advertisement\" Relationship=\"ODataDemo.FeaturedProduct_Advertiseme" +
                "nt_Advertisement_FeaturedProduct\" ToRole=\"Advertisement_FeaturedProduct\" FromRol" +
                "e=\"FeaturedProduct_Advertisement\" /></EntityType><EntityType Name=\"ProductDetail" +
                "\"><Key><PropertyRef Name=\"ProductID\" /></Key><Property Name=\"ProductID\" Type=\"Ed" +
                "m.Int32\" Nullable=\"false\" /><Property Name=\"Details\" Type=\"Edm.String\" /><Naviga" +
                "tionProperty Name=\"Product\" Relationship=\"ODataDemo.Product_ProductDetail_Produc" +
                "tDetail_Product\" ToRole=\"Product_ProductDetail\" FromRole=\"ProductDetail_Product\"" +
                " /></EntityType><EntityType Name=\"Category\" OpenType=\"true\"><Key><PropertyRef Na" +
                "me=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Int32\" Nullable=\"false\" /><Propert" +
                "y Name=\"Name\" Type=\"Edm.String\" m:FC_TargetPath=\"SyndicationTitle\" m:FC_ContentK" +
                "ind=\"text\" m:FC_KeepInContent=\"true\" /><NavigationProperty Name=\"Products\" Relat" +
                "ionship=\"ODataDemo.Product_Categories_Category_Products\" ToRole=\"Product_Categor" +
                "ies\" FromRole=\"Category_Products\" /></EntityType><EntityType Name=\"Supplier\"><Ke" +
                "y><PropertyRef Name=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Int32\" Nullable=\"" +
                "false\" /><Property Name=\"Name\" Type=\"Edm.String\" m:FC_TargetPath=\"SyndicationTit" +
                "le\" m:FC_ContentKind=\"text\" m:FC_KeepInContent=\"true\" /><Property Name=\"Address\"" +
                " Type=\"ODataDemo.Address\" /><Property Name=\"Location\" Type=\"Edm.GeographyPoint\" " +
                "SRID=\"Variable\" /><Property Name=\"Concurrency\" Type=\"Edm.Int32\" ConcurrencyMode=" +
                "\"Fixed\" Nullable=\"false\" /><NavigationProperty Name=\"Products\" Relationship=\"ODa" +
                "taDemo.Product_Supplier_Supplier_Products\" ToRole=\"Product_Supplier\" FromRole=\"S" +
                "upplier_Products\" /></EntityType><ComplexType Name=\"Address\"><Property Name=\"Str" +
                "eet\" Type=\"Edm.String\" /><Property Name=\"City\" Type=\"Edm.String\" /><Property Nam" +
                "e=\"State\" Type=\"Edm.String\" /><Property Name=\"ZipCode\" Type=\"Edm.String\" /><Prop" +
                "erty Name=\"Country\" Type=\"Edm.String\" /></ComplexType><EntityType Name=\"Person\">" +
                "<Key><PropertyRef Name=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Int32\" Nullabl" +
                "e=\"false\" /><Property Name=\"Name\" Type=\"Edm.String\" /><NavigationProperty Name=\"" +
                "PersonDetail\" Relationship=\"ODataDemo.Person_PersonDetail_PersonDetail_Person\" T" +
                "oRole=\"PersonDetail_Person\" FromRole=\"Person_PersonDetail\" /></EntityType><Entit" +
                "yType Name=\"Customer\" BaseType=\"ODataDemo.Person\"><Property Name=\"TotalExpense\" " +
                "Type=\"Edm.Decimal\" Nullable=\"false\" /></EntityType><EntityType Name=\"Employee\" B" +
                "aseType=\"ODataDemo.Person\"><Property Name=\"EmployeeID\" Type=\"Edm.Int64\" Nullable" +
                "=\"false\" /><Property Name=\"HireDate\" Type=\"Edm.DateTime\" Nullable=\"false\" /><Pro" +
                "perty Name=\"Salary\" Type=\"Edm.Single\" Nullable=\"false\" /></EntityType><EntityTyp" +
                "e Name=\"PersonDetail\"><Key><PropertyRef Name=\"PersonID\" /></Key><Property Name=\"" +
                "PersonID\" Type=\"Edm.Int32\" Nullable=\"false\" /><Property Name=\"Age\" Type=\"Edm.Byt" +
                "e\" Nullable=\"false\" /><Property Name=\"Gender\" Type=\"Edm.Boolean\" Nullable=\"false" +
                "\" /><Property Name=\"Phone\" Type=\"Edm.String\" /><Property Name=\"Address\" Type=\"OD" +
                "ataDemo.Address\" /><Property Name=\"Photo\" Type=\"Edm.Stream\" Nullable=\"false\" /><" +
                "NavigationProperty Name=\"Person\" Relationship=\"ODataDemo.Person_PersonDetail_Per" +
                "sonDetail_Person\" ToRole=\"Person_PersonDetail\" FromRole=\"PersonDetail_Person\" />" +
                "</EntityType><EntityType Name=\"Advertisement\" m:HasStream=\"true\"><Key><PropertyR" +
                "ef Name=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Guid\" Nullable=\"false\" /><Pro" +
                "perty Name=\"Name\" Type=\"Edm.String\" /><Property Name=\"AirDate\" Type=\"Edm.DateTim" +
                "e\" Nullable=\"false\" /><NavigationProperty Name=\"FeaturedProduct\" Relationship=\"O" +
                "DataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct\" ToRole=\"Fe" +
                "aturedProduct_Advertisement\" FromRole=\"Advertisement_FeaturedProduct\" /></Entity" +
                "Type><Association Name=\"Product_Categories_Category_Products\"><End Type=\"ODataDe" +
                "mo.Category\" Role=\"Category_Products\" Multiplicity=\"*\" /><End Type=\"ODataDemo.Pr" +
                "oduct\" Role=\"Product_Categories\" Multiplicity=\"*\" /></Association><Association N" +
                "ame=\"Product_Supplier_Supplier_Products\"><End Type=\"ODataDemo.Supplier\" Role=\"Su" +
                "pplier_Products\" Multiplicity=\"0..1\" /><End Type=\"ODataDemo.Product\" Role=\"Produ" +
                "ct_Supplier\" Multiplicity=\"*\" /></Association><Association Name=\"Product_Product" +
                "Detail_ProductDetail_Product\"><End Type=\"ODataDemo.ProductDetail\" Role=\"ProductD" +
                "etail_Product\" Multiplicity=\"0..1\" /><End Type=\"ODataDemo.Product\" Role=\"Product" +
                "_ProductDetail\" Multiplicity=\"0..1\" /></Association><Association Name=\"FeaturedP" +
                "roduct_Advertisement_Advertisement_FeaturedProduct\"><End Type=\"ODataDemo.Adverti" +
                "sement\" Role=\"Advertisement_FeaturedProduct\" Multiplicity=\"0..1\" /><End Type=\"OD" +
                "ataDemo.FeaturedProduct\" Role=\"FeaturedProduct_Advertisement\" Multiplicity=\"0..1" +
                "\" /></Association><Association Name=\"Person_PersonDetail_PersonDetail_Person\"><E" +
                "nd Type=\"ODataDemo.PersonDetail\" Role=\"PersonDetail_Person\" Multiplicity=\"0..1\" " +
                "/><End Type=\"ODataDemo.Person\" Role=\"Person_PersonDetail\" Multiplicity=\"0..1\" />" +
                "</Association><EntityContainer Name=\"DemoService\" m:IsDefaultEntityContainer=\"tr" +
                "ue\"><EntitySet Name=\"Products\" EntityType=\"ODataDemo.Product\" /><EntitySet Name=" +
                "\"ProductDetails\" EntityType=\"ODataDemo.ProductDetail\" /><EntitySet Name=\"Categor" +
                "ies\" EntityType=\"ODataDemo.Category\" /><EntitySet Name=\"Suppliers\" EntityType=\"O" +
                "DataDemo.Supplier\" /><EntitySet Name=\"Persons\" EntityType=\"ODataDemo.Person\" /><" +
                "EntitySet Name=\"PersonDetails\" EntityType=\"ODataDemo.PersonDetail\" /><EntitySet " +
                "Name=\"Advertisements\" EntityType=\"ODataDemo.Advertisement\" /><FunctionImport Nam" +
                "e=\"GetProductsByRating\" ReturnType=\"Collection(ODataDemo.Product)\" EntitySet=\"Pr" +
                "oducts\" m:HttpMethod=\"GET\"><Parameter Name=\"rating\" Type=\"Edm.Int16\" Nullable=\"f" +
                "alse\" /></FunctionImport><AssociationSet Name=\"Products_Advertisement_Advertisem" +
                "ents\" Association=\"ODataDemo.FeaturedProduct_Advertisement_Advertisement_Feature" +
                "dProduct\"><End Role=\"FeaturedProduct_Advertisement\" EntitySet=\"Products\" /><End " +
                "Role=\"Advertisement_FeaturedProduct\" EntitySet=\"Advertisements\" /></AssociationS" +
                "et><AssociationSet Name=\"Products_Categories_Categories\" As";
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private const string ModelPart1 = "sociation=\"ODataDemo.Product_Categories_Category_Products\"><End Role=\"Product_Cat" +
                "egories\" EntitySet=\"Products\" /><End Role=\"Category_Products\" EntitySet=\"Categor" +
                "ies\" /></AssociationSet><AssociationSet Name=\"Products_Supplier_Suppliers\" Assoc" +
                "iation=\"ODataDemo.Product_Supplier_Supplier_Products\"><End Role=\"Product_Supplie" +
                "r\" EntitySet=\"Products\" /><End Role=\"Supplier_Products\" EntitySet=\"Suppliers\" />" +
                "</AssociationSet><AssociationSet Name=\"Products_ProductDetail_ProductDetails\" As" +
                "sociation=\"ODataDemo.Product_ProductDetail_ProductDetail_Product\"><End Role=\"Pro" +
                "duct_ProductDetail\" EntitySet=\"Products\" /><End Role=\"ProductDetail_Product\" Ent" +
                "itySet=\"ProductDetails\" /></AssociationSet><AssociationSet Name=\"Persons_PersonD" +
                "etail_PersonDetails\" Association=\"ODataDemo.Person_PersonDetail_PersonDetail_Per" +
                "son\"><End Role=\"Person_PersonDetail\" EntitySet=\"Persons\" /><End Role=\"PersonDeta" +
                "il_Person\" EntitySet=\"PersonDetails\" /></AssociationSet></EntityContainer><Annot" +
                "ations Target=\"ODataDemo.DemoService\"><ValueAnnotation Term=\"Org.OData.Display.V" +
                "1.Description\" String=\"This is a sample OData service with vocabularies\" /></Ann" +
                "otations><Annotations Target=\"ODataDemo.Product\"><ValueAnnotation Term=\"Org.ODat" +
                "a.Display.V1.Description\" String=\"All Products available in the online store\" />" +
                "</Annotations><Annotations Target=\"ODataDemo.Product/Name\"><ValueAnnotation Term" +
                "=\"Org.OData.Display.V1.DisplayName\" String=\"Product Name\" /></Annotations><Annot" +
                "ations Target=\"ODataDemo.DemoService/Suppliers\"><ValueAnnotation Term=\"Org.OData" +
                ".Publication.V1.PublisherName\" String=\"Microsoft Corp.\" /><ValueAnnotation Term=" +
                "\"Org.OData.Publication.V1.PublisherId\" String=\"MSFT\" /><ValueAnnotation Term=\"Or" +
                "g.OData.Publication.V1.Keywords\" String=\"Inventory, Supplier, Advertisers, Sales" +
                ", Finance\" /><ValueAnnotation Term=\"Org.OData.Publication.V1.AttributionUrl\" Str" +
                "ing=\"http://www.odata.org/\" /><ValueAnnotation Term=\"Org.OData.Publication.V1.At" +
                "tributionDescription\" String=\"All rights reserved\" /><ValueAnnotation Term=\"Org." +
                "OData.Publication.V1.DocumentationUrl \" String=\"http://www.odata.org/\" /><ValueA" +
                "nnotation Term=\"Org.OData.Publication.V1.TermsOfUseUrl\" String=\"All rights reser" +
                "ved\" /><ValueAnnotation Term=\"Org.OData.Publication.V1.PrivacyPolicyUrl\" String=" +
                "\"http://www.odata.org/\" /><ValueAnnotation Term=\"Org.OData.Publication.V1.LastMo" +
                "dified\" String=\"4/2/2013\" /><ValueAnnotation Term=\"Org.OData.Publication.V1.Imag" +
                "eUrl \" String=\"http://www.odata.org/\" /></Annotations></Schema></edmx:DataServic" +
                "es></edmx:Edmx>";
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static string GetConcatenatedEdmxString()
            {
                return string.Concat(ModelPart0, ModelPart1);
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            public static global::Microsoft.Data.Edm.IEdmModel GetInstance()
            {
                return ParsedModel;
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static global::Microsoft.Data.Edm.IEdmModel LoadModelFromString()
            {
                string edmxToParse = GetConcatenatedEdmxString();
                global::System.Xml.XmlReader reader = CreateXmlReader(edmxToParse);
                try
                {
                    return global::Microsoft.Data.Edm.Csdl.EdmxReader.Parse(reader);
                }
                finally
                {
                    ((global::System.IDisposable)(reader)).Dispose();
                }
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
            private static global::System.Xml.XmlReader CreateXmlReader(string edmxToParse)
            {
                return global::System.Xml.XmlReader.Create(new global::System.IO.StringReader(edmxToParse));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.Product in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Products")]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("Name", global::System.Data.Services.Common.SyndicationItemProperty.Title, global::System.Data.Services.Common.SyndicationTextContentKind.Plaintext, false)]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("Description", global::System.Data.Services.Common.SyndicationItemProperty.Summary, global::System.Data.Services.Common.SyndicationTextContentKind.Plaintext, false)]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Product : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Product object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="releaseDate">Initial value of ReleaseDate.</param>
        /// <param name="rating">Initial value of Rating.</param>
        /// <param name="price">Initial value of Price.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Product CreateProduct(int ID, global::System.DateTime releaseDate, short rating, double price)
        {
            Product product = new Product();
            product.ID = ID;
            product.ReleaseDate = releaseDate;
            product.Rating = rating;
            product.Price = price;
            return product;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
                this.OnPropertyChanged("ID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property Description in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Description
        {
            get
            {
                return this._Description;
            }
            set
            {
                this.OnDescriptionChanging(value);
                this._Description = value;
                this.OnDescriptionChanged();
                this.OnPropertyChanged("Description");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Description;
        partial void OnDescriptionChanging(string value);
        partial void OnDescriptionChanged();
        /// <summary>
        /// There are no comments for Property ReleaseDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTime ReleaseDate
        {
            get
            {
                return this._ReleaseDate;
            }
            set
            {
                this.OnReleaseDateChanging(value);
                this._ReleaseDate = value;
                this.OnReleaseDateChanged();
                this.OnPropertyChanged("ReleaseDate");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTime _ReleaseDate;
        partial void OnReleaseDateChanging(global::System.DateTime value);
        partial void OnReleaseDateChanged();
        /// <summary>
        /// There are no comments for Property DiscontinuedDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Nullable<global::System.DateTime> DiscontinuedDate
        {
            get
            {
                return this._DiscontinuedDate;
            }
            set
            {
                this.OnDiscontinuedDateChanging(value);
                this._DiscontinuedDate = value;
                this.OnDiscontinuedDateChanged();
                this.OnPropertyChanged("DiscontinuedDate");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Nullable<global::System.DateTime> _DiscontinuedDate;
        partial void OnDiscontinuedDateChanging(global::System.Nullable<global::System.DateTime> value);
        partial void OnDiscontinuedDateChanged();
        /// <summary>
        /// There are no comments for Property Rating in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public short Rating
        {
            get
            {
                return this._Rating;
            }
            set
            {
                this.OnRatingChanging(value);
                this._Rating = value;
                this.OnRatingChanged();
                this.OnPropertyChanged("Rating");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private short _Rating;
        partial void OnRatingChanging(short value);
        partial void OnRatingChanged();
        /// <summary>
        /// There are no comments for Property Price in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public double Price
        {
            get
            {
                return this._Price;
            }
            set
            {
                this.OnPriceChanging(value);
                this._Price = value;
                this.OnPriceChanged();
                this.OnPropertyChanged("Price");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private double _Price;
        partial void OnPriceChanging(double value);
        partial void OnPriceChanged();
        /// <summary>
        /// There are no comments for Categories in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceCollection<Category> Categories
        {
            get
            {
                return this._Categories;
            }
            set
            {
                this._Categories = value;
                this.OnPropertyChanged("Categories");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceCollection<Category> _Categories = new global::System.Data.Services.Client.DataServiceCollection<Category>(null, global::System.Data.Services.Client.TrackingMode.None);
        /// <summary>
        /// There are no comments for Supplier in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Supplier Supplier
        {
            get
            {
                return this._Supplier;
            }
            set
            {
                this._Supplier = value;
                this.OnPropertyChanged("Supplier");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private Supplier _Supplier;
        /// <summary>
        /// There are no comments for ProductDetail in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public ProductDetail ProductDetail
        {
            get
            {
                return this._ProductDetail;
            }
            set
            {
                this._ProductDetail = value;
                this.OnPropertyChanged("ProductDetail");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private ProductDetail _ProductDetail;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.FeaturedProduct in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class FeaturedProduct : Product
    {
        /// <summary>
        /// Create a new FeaturedProduct object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="releaseDate">Initial value of ReleaseDate.</param>
        /// <param name="rating">Initial value of Rating.</param>
        /// <param name="price">Initial value of Price.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static FeaturedProduct CreateFeaturedProduct(int ID, global::System.DateTime releaseDate, short rating, double price)
        {
            FeaturedProduct featuredProduct = new FeaturedProduct();
            featuredProduct.ID = ID;
            featuredProduct.ReleaseDate = releaseDate;
            featuredProduct.Rating = rating;
            featuredProduct.Price = price;
            return featuredProduct;
        }
        /// <summary>
        /// There are no comments for Advertisement in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Advertisement Advertisement
        {
            get
            {
                return this._Advertisement;
            }
            set
            {
                this._Advertisement = value;
                this.OnPropertyChanged("Advertisement");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private Advertisement _Advertisement;
    }
    /// <summary>
    /// There are no comments for ODataDemo.ProductDetail in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ProductID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("ProductDetails")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ProductID")]
    public partial class ProductDetail : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new ProductDetail object.
        /// </summary>
        /// <param name="productID">Initial value of ProductID.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static ProductDetail CreateProductDetail(int productID)
        {
            ProductDetail productDetail = new ProductDetail();
            productDetail.ProductID = productID;
            return productDetail;
        }
        /// <summary>
        /// There are no comments for Property ProductID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int ProductID
        {
            get
            {
                return this._ProductID;
            }
            set
            {
                this.OnProductIDChanging(value);
                this._ProductID = value;
                this.OnProductIDChanged();
                this.OnPropertyChanged("ProductID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _ProductID;
        partial void OnProductIDChanging(int value);
        partial void OnProductIDChanged();
        /// <summary>
        /// There are no comments for Property Details in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Details
        {
            get
            {
                return this._Details;
            }
            set
            {
                this.OnDetailsChanging(value);
                this._Details = value;
                this.OnDetailsChanged();
                this.OnPropertyChanged("Details");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Details;
        partial void OnDetailsChanging(string value);
        partial void OnDetailsChanged();
        /// <summary>
        /// There are no comments for Product in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Product Product
        {
            get
            {
                return this._Product;
            }
            set
            {
                this._Product = value;
                this.OnPropertyChanged("Product");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private Product _Product;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.Category in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Categories")]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("Name", global::System.Data.Services.Common.SyndicationItemProperty.Title, global::System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Category : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Category object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Category CreateCategory(int ID)
        {
            Category category = new Category();
            category.ID = ID;
            return category;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
                this.OnPropertyChanged("ID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Products in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceCollection<Product> Products
        {
            get
            {
                return this._Products;
            }
            set
            {
                this._Products = value;
                this.OnPropertyChanged("Products");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceCollection<Product> _Products = new global::System.Data.Services.Client.DataServiceCollection<Product>(null, global::System.Data.Services.Client.TrackingMode.None);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ComplexType ODataDemo.Address in the schema.
    /// </summary>
    public partial class Address : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// There are no comments for Property Street in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Street
        {
            get
            {
                return this._Street;
            }
            set
            {
                this.OnStreetChanging(value);
                this._Street = value;
                this.OnStreetChanged();
                this.OnPropertyChanged("Street");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Street;
        partial void OnStreetChanging(string value);
        partial void OnStreetChanged();
        /// <summary>
        /// There are no comments for Property City in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string City
        {
            get
            {
                return this._City;
            }
            set
            {
                this.OnCityChanging(value);
                this._City = value;
                this.OnCityChanged();
                this.OnPropertyChanged("City");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _City;
        partial void OnCityChanging(string value);
        partial void OnCityChanged();
        /// <summary>
        /// There are no comments for Property State in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string State
        {
            get
            {
                return this._State;
            }
            set
            {
                this.OnStateChanging(value);
                this._State = value;
                this.OnStateChanged();
                this.OnPropertyChanged("State");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _State;
        partial void OnStateChanging(string value);
        partial void OnStateChanged();
        /// <summary>
        /// There are no comments for Property ZipCode in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string ZipCode
        {
            get
            {
                return this._ZipCode;
            }
            set
            {
                this.OnZipCodeChanging(value);
                this._ZipCode = value;
                this.OnZipCodeChanged();
                this.OnPropertyChanged("ZipCode");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _ZipCode;
        partial void OnZipCodeChanging(string value);
        partial void OnZipCodeChanged();
        /// <summary>
        /// There are no comments for Property Country in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Country
        {
            get
            {
                return this._Country;
            }
            set
            {
                this.OnCountryChanging(value);
                this._Country = value;
                this.OnCountryChanged();
                this.OnPropertyChanged("Country");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Country;
        partial void OnCountryChanging(string value);
        partial void OnCountryChanged();
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.Supplier in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Suppliers")]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("Name", global::System.Data.Services.Common.SyndicationItemProperty.Title, global::System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Supplier : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Supplier object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="concurrency">Initial value of Concurrency.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Supplier CreateSupplier(int ID, int concurrency)
        {
            Supplier supplier = new Supplier();
            supplier.ID = ID;
            supplier.Concurrency = concurrency;
            return supplier;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
                this.OnPropertyChanged("ID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property Address in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Address Address
        {
            get
            {
                if (((this._Address == null) 
                            && (this._AddressInitialized != true)))
                {
                    this._Address = new Address();
                    this._AddressInitialized = true;
                }
                return this._Address;
            }
            set
            {
                this.OnAddressChanging(value);
                this._Address = value;
                this._AddressInitialized = true;
                this.OnAddressChanged();
                this.OnPropertyChanged("Address");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private Address _Address;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private bool _AddressInitialized;
        partial void OnAddressChanging(Address value);
        partial void OnAddressChanged();
        /// <summary>
        /// There are no comments for Property Location in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Spatial.GeographyPoint Location
        {
            get
            {
                return this._Location;
            }
            set
            {
                this.OnLocationChanging(value);
                this._Location = value;
                this.OnLocationChanged();
                this.OnPropertyChanged("Location");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Spatial.GeographyPoint _Location;
        partial void OnLocationChanging(global::System.Spatial.GeographyPoint value);
        partial void OnLocationChanged();
        /// <summary>
        /// There are no comments for Property Concurrency in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int Concurrency
        {
            get
            {
                return this._Concurrency;
            }
            set
            {
                this.OnConcurrencyChanging(value);
                this._Concurrency = value;
                this.OnConcurrencyChanged();
                this.OnPropertyChanged("Concurrency");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _Concurrency;
        partial void OnConcurrencyChanging(int value);
        partial void OnConcurrencyChanged();
        /// <summary>
        /// There are no comments for Products in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceCollection<Product> Products
        {
            get
            {
                return this._Products;
            }
            set
            {
                this._Products = value;
                this.OnPropertyChanged("Products");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceCollection<Product> _Products = new global::System.Data.Services.Client.DataServiceCollection<Product>(null, global::System.Data.Services.Client.TrackingMode.None);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.Person in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Persons")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Person : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Person object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Person CreatePerson(int ID)
        {
            Person person = new Person();
            person.ID = ID;
            return person;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
                this.OnPropertyChanged("ID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for PersonDetail in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public PersonDetail PersonDetail
        {
            get
            {
                return this._PersonDetail;
            }
            set
            {
                this._PersonDetail = value;
                this.OnPropertyChanged("PersonDetail");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private PersonDetail _PersonDetail;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.Customer in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Customer : Person
    {
        /// <summary>
        /// Create a new Customer object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="totalExpense">Initial value of TotalExpense.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Customer CreateCustomer(int ID, decimal totalExpense)
        {
            Customer customer = new Customer();
            customer.ID = ID;
            customer.TotalExpense = totalExpense;
            return customer;
        }
        /// <summary>
        /// There are no comments for Property TotalExpense in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public decimal TotalExpense
        {
            get
            {
                return this._TotalExpense;
            }
            set
            {
                this.OnTotalExpenseChanging(value);
                this._TotalExpense = value;
                this.OnTotalExpenseChanged();
                this.OnPropertyChanged("TotalExpense");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private decimal _TotalExpense;
        partial void OnTotalExpenseChanging(decimal value);
        partial void OnTotalExpenseChanged();
    }
    /// <summary>
    /// There are no comments for ODataDemo.Employee in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Employee : Person
    {
        /// <summary>
        /// Create a new Employee object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="employeeID">Initial value of EmployeeID.</param>
        /// <param name="hireDate">Initial value of HireDate.</param>
        /// <param name="salary">Initial value of Salary.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Employee CreateEmployee(int ID, long employeeID, global::System.DateTime hireDate, float salary)
        {
            Employee employee = new Employee();
            employee.ID = ID;
            employee.EmployeeID = employeeID;
            employee.HireDate = hireDate;
            employee.Salary = salary;
            return employee;
        }
        /// <summary>
        /// There are no comments for Property EmployeeID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public long EmployeeID
        {
            get
            {
                return this._EmployeeID;
            }
            set
            {
                this.OnEmployeeIDChanging(value);
                this._EmployeeID = value;
                this.OnEmployeeIDChanged();
                this.OnPropertyChanged("EmployeeID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private long _EmployeeID;
        partial void OnEmployeeIDChanging(long value);
        partial void OnEmployeeIDChanged();
        /// <summary>
        /// There are no comments for Property HireDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTime HireDate
        {
            get
            {
                return this._HireDate;
            }
            set
            {
                this.OnHireDateChanging(value);
                this._HireDate = value;
                this.OnHireDateChanged();
                this.OnPropertyChanged("HireDate");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTime _HireDate;
        partial void OnHireDateChanging(global::System.DateTime value);
        partial void OnHireDateChanged();
        /// <summary>
        /// There are no comments for Property Salary in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public float Salary
        {
            get
            {
                return this._Salary;
            }
            set
            {
                this.OnSalaryChanging(value);
                this._Salary = value;
                this.OnSalaryChanged();
                this.OnPropertyChanged("Salary");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private float _Salary;
        partial void OnSalaryChanging(float value);
        partial void OnSalaryChanged();
    }
    /// <summary>
    /// There are no comments for ODataDemo.PersonDetail in the schema.
    /// </summary>
    /// <KeyProperties>
    /// PersonID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("PersonDetails")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("PersonID")]
    public partial class PersonDetail : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new PersonDetail object.
        /// </summary>
        /// <param name="personID">Initial value of PersonID.</param>
        /// <param name="age">Initial value of Age.</param>
        /// <param name="gender">Initial value of Gender.</param>
        /// <param name="photo">Initial value of Photo.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static PersonDetail CreatePersonDetail(int personID, byte age, bool gender, global::System.Data.Services.Client.DataServiceStreamLink photo)
        {
            PersonDetail personDetail = new PersonDetail();
            personDetail.PersonID = personID;
            personDetail.Age = age;
            personDetail.Gender = gender;
            personDetail.Photo = photo;
            return personDetail;
        }
        /// <summary>
        /// There are no comments for Property PersonID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int PersonID
        {
            get
            {
                return this._PersonID;
            }
            set
            {
                this.OnPersonIDChanging(value);
                this._PersonID = value;
                this.OnPersonIDChanged();
                this.OnPropertyChanged("PersonID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _PersonID;
        partial void OnPersonIDChanging(int value);
        partial void OnPersonIDChanged();
        /// <summary>
        /// There are no comments for Property Age in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public byte Age
        {
            get
            {
                return this._Age;
            }
            set
            {
                this.OnAgeChanging(value);
                this._Age = value;
                this.OnAgeChanged();
                this.OnPropertyChanged("Age");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private byte _Age;
        partial void OnAgeChanging(byte value);
        partial void OnAgeChanged();
        /// <summary>
        /// There are no comments for Property Gender in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public bool Gender
        {
            get
            {
                return this._Gender;
            }
            set
            {
                this.OnGenderChanging(value);
                this._Gender = value;
                this.OnGenderChanged();
                this.OnPropertyChanged("Gender");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private bool _Gender;
        partial void OnGenderChanging(bool value);
        partial void OnGenderChanged();
        /// <summary>
        /// There are no comments for Property Phone in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Phone
        {
            get
            {
                return this._Phone;
            }
            set
            {
                this.OnPhoneChanging(value);
                this._Phone = value;
                this.OnPhoneChanged();
                this.OnPropertyChanged("Phone");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Phone;
        partial void OnPhoneChanging(string value);
        partial void OnPhoneChanged();
        /// <summary>
        /// There are no comments for Property Address in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Address Address
        {
            get
            {
                if (((this._Address == null) 
                            && (this._AddressInitialized != true)))
                {
                    this._Address = new Address();
                    this._AddressInitialized = true;
                }
                return this._Address;
            }
            set
            {
                this.OnAddressChanging(value);
                this._Address = value;
                this._AddressInitialized = true;
                this.OnAddressChanged();
                this.OnPropertyChanged("Address");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private Address _Address;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private bool _AddressInitialized;
        partial void OnAddressChanging(Address value);
        partial void OnAddressChanged();
        /// <summary>
        /// There are no comments for Property Photo in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceStreamLink Photo
        {
            get
            {
                return this._Photo;
            }
            set
            {
                this.OnPhotoChanging(value);
                this._Photo = value;
                this.OnPhotoChanged();
                this.OnPropertyChanged("Photo");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceStreamLink _Photo;
        partial void OnPhotoChanging(global::System.Data.Services.Client.DataServiceStreamLink value);
        partial void OnPhotoChanged();
        /// <summary>
        /// There are no comments for Person in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public Person Person
        {
            get
            {
                return this._Person;
            }
            set
            {
                this._Person = value;
                this.OnPropertyChanged("Person");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private Person _Person;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for ODataDemo.Advertisement in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Advertisements")]
    [global::System.Data.Services.Common.HasStreamAttribute()]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Advertisement : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Advertisement object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="airDate">Initial value of AirDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Advertisement CreateAdvertisement(global::System.Guid ID, global::System.DateTime airDate)
        {
            Advertisement advertisement = new Advertisement();
            advertisement.ID = ID;
            advertisement.AirDate = airDate;
            return advertisement;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Guid ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
                this.OnPropertyChanged("ID");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Guid _ID;
        partial void OnIDChanging(global::System.Guid value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property AirDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTime AirDate
        {
            get
            {
                return this._AirDate;
            }
            set
            {
                this.OnAirDateChanging(value);
                this._AirDate = value;
                this.OnAirDateChanged();
                this.OnPropertyChanged("AirDate");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTime _AirDate;
        partial void OnAirDateChanging(global::System.DateTime value);
        partial void OnAirDateChanged();
        /// <summary>
        /// There are no comments for FeaturedProduct in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public FeaturedProduct FeaturedProduct
        {
            get
            {
                return this._FeaturedProduct;
            }
            set
            {
                this._FeaturedProduct = value;
                this.OnPropertyChanged("FeaturedProduct");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private FeaturedProduct _FeaturedProduct;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
}
