//------------------------------------------------------------------------------
// <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.ComponentModel;
using System.Data.EntityClient;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml.Serialization;

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

[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Album__ArtistId__108B795B", "Artist", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(iTunes.ChinookModel.Artist), "Album", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Album))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Track__AlbumId__117F9D94", "Album", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(iTunes.ChinookModel.Album), "Track", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Track))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Customer__Suppor__15502E78", "Employee", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(iTunes.ChinookModel.Employee), "Customer", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Customer))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Invoice__Custome__164452B1", "Customer", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(iTunes.ChinookModel.Customer), "Invoice", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Invoice))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Employee__Report__145C0A3F", "Employee", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(iTunes.ChinookModel.Employee), "Employee1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Employee))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Track__GenreId__1367E606", "Genre", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(iTunes.ChinookModel.Genre), "Track", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Track))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__InvoiceLi__Invoi__182C9B23", "Invoice", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(iTunes.ChinookModel.Invoice), "InvoiceLine", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.InvoiceLine))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__InvoiceLi__Track__173876EA", "Track", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(iTunes.ChinookModel.Track), "InvoiceLine", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.InvoiceLine))]
[assembly: EdmRelationshipAttribute("ChinookModel", "FK__Track__MediaType__1273C1CD", "MediaType", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(iTunes.ChinookModel.MediaType), "Track", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Track))]
[assembly: EdmRelationshipAttribute("ChinookModel", "PlaylistTrack", "Playlist", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Playlist), "Track", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(iTunes.ChinookModel.Track))]

#endregion

namespace iTunes.ChinookModel
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class ChinookEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new ChinookEntities object using the connection string found in the 'ChinookEntities' section of the application configuration file.
        /// </summary>
        public ChinookEntities() : base("name=ChinookEntities", "ChinookEntities")
        {
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new ChinookEntities object.
        /// </summary>
        public ChinookEntities(string connectionString) : base(connectionString, "ChinookEntities")
        {
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new ChinookEntities object.
        /// </summary>
        public ChinookEntities(EntityConnection connection) : base(connection, "ChinookEntities")
        {
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Album> Albums
        {
            get
            {
                if ((_Albums == null))
                {
                    _Albums = base.CreateObjectSet<Album>("Albums");
                }
                return _Albums;
            }
        }
        private ObjectSet<Album> _Albums;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Artist> Artists
        {
            get
            {
                if ((_Artists == null))
                {
                    _Artists = base.CreateObjectSet<Artist>("Artists");
                }
                return _Artists;
            }
        }
        private ObjectSet<Artist> _Artists;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Customer> Customers
        {
            get
            {
                if ((_Customers == null))
                {
                    _Customers = base.CreateObjectSet<Customer>("Customers");
                }
                return _Customers;
            }
        }
        private ObjectSet<Customer> _Customers;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Employee> Employees
        {
            get
            {
                if ((_Employees == null))
                {
                    _Employees = base.CreateObjectSet<Employee>("Employees");
                }
                return _Employees;
            }
        }
        private ObjectSet<Employee> _Employees;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Genre> Genres
        {
            get
            {
                if ((_Genres == null))
                {
                    _Genres = base.CreateObjectSet<Genre>("Genres");
                }
                return _Genres;
            }
        }
        private ObjectSet<Genre> _Genres;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Invoice> Invoices
        {
            get
            {
                if ((_Invoices == null))
                {
                    _Invoices = base.CreateObjectSet<Invoice>("Invoices");
                }
                return _Invoices;
            }
        }
        private ObjectSet<Invoice> _Invoices;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<InvoiceLine> InvoiceLines
        {
            get
            {
                if ((_InvoiceLines == null))
                {
                    _InvoiceLines = base.CreateObjectSet<InvoiceLine>("InvoiceLines");
                }
                return _InvoiceLines;
            }
        }
        private ObjectSet<InvoiceLine> _InvoiceLines;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MediaType> MediaTypes
        {
            get
            {
                if ((_MediaTypes == null))
                {
                    _MediaTypes = base.CreateObjectSet<MediaType>("MediaTypes");
                }
                return _MediaTypes;
            }
        }
        private ObjectSet<MediaType> _MediaTypes;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Playlist> Playlists
        {
            get
            {
                if ((_Playlists == null))
                {
                    _Playlists = base.CreateObjectSet<Playlist>("Playlists");
                }
                return _Playlists;
            }
        }
        private ObjectSet<Playlist> _Playlists;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<sysdiagram> sysdiagrams
        {
            get
            {
                if ((_sysdiagrams == null))
                {
                    _sysdiagrams = base.CreateObjectSet<sysdiagram>("sysdiagrams");
                }
                return _sysdiagrams;
            }
        }
        private ObjectSet<sysdiagram> _sysdiagrams;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Track> Tracks
        {
            get
            {
                if ((_Tracks == null))
                {
                    _Tracks = base.CreateObjectSet<Track>("Tracks");
                }
                return _Tracks;
            }
        }
        private ObjectSet<Track> _Tracks;

        #endregion

        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Albums EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToAlbums(Album album)
        {
            base.AddObject("Albums", album);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Artists EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToArtists(Artist artist)
        {
            base.AddObject("Artists", artist);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCustomers(Customer customer)
        {
            base.AddObject("Customers", customer);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToEmployees(Employee employee)
        {
            base.AddObject("Employees", employee);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Genres EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToGenres(Genre genre)
        {
            base.AddObject("Genres", genre);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Invoices EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToInvoices(Invoice invoice)
        {
            base.AddObject("Invoices", invoice);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the InvoiceLines EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToInvoiceLines(InvoiceLine invoiceLine)
        {
            base.AddObject("InvoiceLines", invoiceLine);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MediaTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMediaTypes(MediaType mediaType)
        {
            base.AddObject("MediaTypes", mediaType);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Playlists EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPlaylists(Playlist playlist)
        {
            base.AddObject("Playlists", playlist);
        }
    
        /// <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(sysdiagram sysdiagram)
        {
            base.AddObject("sysdiagrams", sysdiagram);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Tracks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToTracks(Track track)
        {
            base.AddObject("Tracks", track);
        }

        #endregion

    }

    #endregion

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

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 AlbumId
        {
            get
            {
                return _AlbumId;
            }
            set
            {
                if (_AlbumId != value)
                {
                    OnAlbumIdChanging(value);
                    ReportPropertyChanging("AlbumId");
                    _AlbumId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("AlbumId");
                    OnAlbumIdChanged();
                }
            }
        }
        private global::System.Int32 _AlbumId;
        partial void OnAlbumIdChanging(global::System.Int32 value);
        partial void OnAlbumIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Album__ArtistId__108B795B", "Artist")]
        public Artist Artist
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Artist>("ChinookModel.FK__Album__ArtistId__108B795B", "Artist").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Artist>("ChinookModel.FK__Album__ArtistId__108B795B", "Artist").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Artist> ArtistReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Artist>("ChinookModel.FK__Album__ArtistId__108B795B", "Artist");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Artist>("ChinookModel.FK__Album__ArtistId__108B795B", "Artist", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Track__AlbumId__117F9D94", "Track")]
        public EntityCollection<Track> Tracks
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Track>("ChinookModel.FK__Track__AlbumId__117F9D94", "Track");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Track>("ChinookModel.FK__Track__AlbumId__117F9D94", "Track", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="Artist")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Artist : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Artist object.
        /// </summary>
        /// <param name="artistId">Initial value of the ArtistId property.</param>
        public static Artist CreateArtist(global::System.Int32 artistId)
        {
            Artist artist = new Artist();
            artist.ArtistId = artistId;
            return artist;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ArtistId
        {
            get
            {
                return _ArtistId;
            }
            set
            {
                if (_ArtistId != value)
                {
                    OnArtistIdChanging(value);
                    ReportPropertyChanging("ArtistId");
                    _ArtistId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ArtistId");
                    OnArtistIdChanged();
                }
            }
        }
        private global::System.Int32 _ArtistId;
        partial void OnArtistIdChanging(global::System.Int32 value);
        partial void OnArtistIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", 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="firstName">Initial value of the FirstName property.</param>
        /// <param name="lastName">Initial value of the LastName property.</param>
        /// <param name="email">Initial value of the Email property.</param>
        public static Customer CreateCustomer(global::System.Int32 customerId, global::System.String firstName, global::System.String lastName, global::System.String email)
        {
            Customer customer = new Customer();
            customer.CustomerId = customerId;
            customer.FirstName = firstName;
            customer.LastName = lastName;
            customer.Email = email;
            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.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=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 Company
        {
            get
            {
                return _Company;
            }
            set
            {
                OnCompanyChanging(value);
                ReportPropertyChanging("Company");
                _Company = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Company");
                OnCompanyChanged();
            }
        }
        private global::System.String _Company;
        partial void OnCompanyChanging(global::System.String value);
        partial void OnCompanyChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Address
        {
            get
            {
                return _Address;
            }
            set
            {
                OnAddressChanging(value);
                ReportPropertyChanging("Address");
                _Address = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Address");
                OnAddressChanged();
            }
        }
        private global::System.String _Address;
        partial void OnAddressChanging(global::System.String value);
        partial void OnAddressChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String City
        {
            get
            {
                return _City;
            }
            set
            {
                OnCityChanging(value);
                ReportPropertyChanging("City");
                _City = StructuralObject.SetValidValue(value, true);
                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=true)]
        [DataMemberAttribute()]
        public global::System.String State
        {
            get
            {
                return _State;
            }
            set
            {
                OnStateChanging(value);
                ReportPropertyChanging("State");
                _State = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("State");
                OnStateChanged();
            }
        }
        private global::System.String _State;
        partial void OnStateChanging(global::System.String value);
        partial void OnStateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Country
        {
            get
            {
                return _Country;
            }
            set
            {
                OnCountryChanging(value);
                ReportPropertyChanging("Country");
                _Country = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Country");
                OnCountryChanged();
            }
        }
        private global::System.String _Country;
        partial void OnCountryChanging(global::System.String value);
        partial void OnCountryChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String PostalCode
        {
            get
            {
                return _PostalCode;
            }
            set
            {
                OnPostalCodeChanging(value);
                ReportPropertyChanging("PostalCode");
                _PostalCode = StructuralObject.SetValidValue(value, true);
                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=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=true)]
        [DataMemberAttribute()]
        public global::System.String Fax
        {
            get
            {
                return _Fax;
            }
            set
            {
                OnFaxChanging(value);
                ReportPropertyChanging("Fax");
                _Fax = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Fax");
                OnFaxChanged();
            }
        }
        private global::System.String _Fax;
        partial void OnFaxChanging(global::System.String value);
        partial void OnFaxChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Email
        {
            get
            {
                return _Email;
            }
            set
            {
                OnEmailChanging(value);
                ReportPropertyChanging("Email");
                _Email = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Email");
                OnEmailChanged();
            }
        }
        private global::System.String _Email;
        partial void OnEmailChanging(global::System.String value);
        partial void OnEmailChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Customer__Suppor__15502E78", "Employee")]
        public Employee Employee
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ChinookModel.FK__Customer__Suppor__15502E78", "Employee").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ChinookModel.FK__Customer__Suppor__15502E78", "Employee").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Employee> EmployeeReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Employee>("ChinookModel.FK__Customer__Suppor__15502E78", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Employee>("ChinookModel.FK__Customer__Suppor__15502E78", "Employee", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Invoice__Custome__164452B1", "Invoice")]
        public EntityCollection<Invoice> Invoices
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Invoice>("ChinookModel.FK__Invoice__Custome__164452B1", "Invoice");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Invoice>("ChinookModel.FK__Invoice__Custome__164452B1", "Invoice", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="Employee")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Employee : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Employee object.
        /// </summary>
        /// <param name="employeeId">Initial value of the EmployeeId property.</param>
        /// <param name="lastName">Initial value of the LastName property.</param>
        /// <param name="firstName">Initial value of the FirstName property.</param>
        public static Employee CreateEmployee(global::System.Int32 employeeId, global::System.String lastName, global::System.String firstName)
        {
            Employee employee = new Employee();
            employee.EmployeeId = employeeId;
            employee.LastName = lastName;
            employee.FirstName = firstName;
            return employee;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 EmployeeId
        {
            get
            {
                return _EmployeeId;
            }
            set
            {
                if (_EmployeeId != value)
                {
                    OnEmployeeIdChanging(value);
                    ReportPropertyChanging("EmployeeId");
                    _EmployeeId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("EmployeeId");
                    OnEmployeeIdChanged();
                }
            }
        }
        private global::System.Int32 _EmployeeId;
        partial void OnEmployeeIdChanging(global::System.Int32 value);
        partial void OnEmployeeIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String LastName
        {
            get
            {
                return _LastName;
            }
            set
            {
                OnLastNameChanging(value);
                ReportPropertyChanging("LastName");
                _LastName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("LastName");
                OnLastNameChanged();
            }
        }
        private global::System.String _LastName;
        partial void OnLastNameChanging(global::System.String value);
        partial void OnLastNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String FirstName
        {
            get
            {
                return _FirstName;
            }
            set
            {
                OnFirstNameChanging(value);
                ReportPropertyChanging("FirstName");
                _FirstName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("FirstName");
                OnFirstNameChanged();
            }
        }
        private global::System.String _FirstName;
        partial void OnFirstNameChanging(global::System.String value);
        partial void OnFirstNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public 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=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> BirthDate
        {
            get
            {
                return _BirthDate;
            }
            set
            {
                OnBirthDateChanging(value);
                ReportPropertyChanging("BirthDate");
                _BirthDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("BirthDate");
                OnBirthDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _BirthDate;
        partial void OnBirthDateChanging(Nullable<global::System.DateTime> value);
        partial void OnBirthDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> HireDate
        {
            get
            {
                return _HireDate;
            }
            set
            {
                OnHireDateChanging(value);
                ReportPropertyChanging("HireDate");
                _HireDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("HireDate");
                OnHireDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _HireDate;
        partial void OnHireDateChanging(Nullable<global::System.DateTime> value);
        partial void OnHireDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Address
        {
            get
            {
                return _Address;
            }
            set
            {
                OnAddressChanging(value);
                ReportPropertyChanging("Address");
                _Address = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Address");
                OnAddressChanged();
            }
        }
        private global::System.String _Address;
        partial void OnAddressChanging(global::System.String value);
        partial void OnAddressChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String City
        {
            get
            {
                return _City;
            }
            set
            {
                OnCityChanging(value);
                ReportPropertyChanging("City");
                _City = StructuralObject.SetValidValue(value, true);
                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=true)]
        [DataMemberAttribute()]
        public global::System.String State
        {
            get
            {
                return _State;
            }
            set
            {
                OnStateChanging(value);
                ReportPropertyChanging("State");
                _State = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("State");
                OnStateChanged();
            }
        }
        private global::System.String _State;
        partial void OnStateChanging(global::System.String value);
        partial void OnStateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Country
        {
            get
            {
                return _Country;
            }
            set
            {
                OnCountryChanging(value);
                ReportPropertyChanging("Country");
                _Country = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Country");
                OnCountryChanged();
            }
        }
        private global::System.String _Country;
        partial void OnCountryChanging(global::System.String value);
        partial void OnCountryChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String PostalCode
        {
            get
            {
                return _PostalCode;
            }
            set
            {
                OnPostalCodeChanging(value);
                ReportPropertyChanging("PostalCode");
                _PostalCode = StructuralObject.SetValidValue(value, true);
                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=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=true)]
        [DataMemberAttribute()]
        public global::System.String Fax
        {
            get
            {
                return _Fax;
            }
            set
            {
                OnFaxChanging(value);
                ReportPropertyChanging("Fax");
                _Fax = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Fax");
                OnFaxChanged();
            }
        }
        private global::System.String _Fax;
        partial void OnFaxChanging(global::System.String value);
        partial void OnFaxChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Email
        {
            get
            {
                return _Email;
            }
            set
            {
                OnEmailChanging(value);
                ReportPropertyChanging("Email");
                _Email = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Email");
                OnEmailChanged();
            }
        }
        private global::System.String _Email;
        partial void OnEmailChanging(global::System.String value);
        partial void OnEmailChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="Genre")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Genre : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Genre object.
        /// </summary>
        /// <param name="genreId">Initial value of the GenreId property.</param>
        public static Genre CreateGenre(global::System.Int32 genreId)
        {
            Genre genre = new Genre();
            genre.GenreId = genreId;
            return genre;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 GenreId
        {
            get
            {
                return _GenreId;
            }
            set
            {
                if (_GenreId != value)
                {
                    OnGenreIdChanging(value);
                    ReportPropertyChanging("GenreId");
                    _GenreId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("GenreId");
                    OnGenreIdChanged();
                }
            }
        }
        private global::System.Int32 _GenreId;
        partial void OnGenreIdChanging(global::System.Int32 value);
        partial void OnGenreIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="Invoice")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Invoice : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Invoice object.
        /// </summary>
        /// <param name="invoiceId">Initial value of the InvoiceId property.</param>
        /// <param name="invoiceDate">Initial value of the InvoiceDate property.</param>
        /// <param name="total">Initial value of the Total property.</param>
        public static Invoice CreateInvoice(global::System.Int32 invoiceId, global::System.DateTime invoiceDate, global::System.Decimal total)
        {
            Invoice invoice = new Invoice();
            invoice.InvoiceId = invoiceId;
            invoice.InvoiceDate = invoiceDate;
            invoice.Total = total;
            return invoice;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 InvoiceId
        {
            get
            {
                return _InvoiceId;
            }
            set
            {
                if (_InvoiceId != value)
                {
                    OnInvoiceIdChanging(value);
                    ReportPropertyChanging("InvoiceId");
                    _InvoiceId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("InvoiceId");
                    OnInvoiceIdChanged();
                }
            }
        }
        private global::System.Int32 _InvoiceId;
        partial void OnInvoiceIdChanging(global::System.Int32 value);
        partial void OnInvoiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime InvoiceDate
        {
            get
            {
                return _InvoiceDate;
            }
            set
            {
                OnInvoiceDateChanging(value);
                ReportPropertyChanging("InvoiceDate");
                _InvoiceDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("InvoiceDate");
                OnInvoiceDateChanged();
            }
        }
        private global::System.DateTime _InvoiceDate;
        partial void OnInvoiceDateChanging(global::System.DateTime value);
        partial void OnInvoiceDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String BillingAddress
        {
            get
            {
                return _BillingAddress;
            }
            set
            {
                OnBillingAddressChanging(value);
                ReportPropertyChanging("BillingAddress");
                _BillingAddress = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BillingAddress");
                OnBillingAddressChanged();
            }
        }
        private global::System.String _BillingAddress;
        partial void OnBillingAddressChanging(global::System.String value);
        partial void OnBillingAddressChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String BillingCity
        {
            get
            {
                return _BillingCity;
            }
            set
            {
                OnBillingCityChanging(value);
                ReportPropertyChanging("BillingCity");
                _BillingCity = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BillingCity");
                OnBillingCityChanged();
            }
        }
        private global::System.String _BillingCity;
        partial void OnBillingCityChanging(global::System.String value);
        partial void OnBillingCityChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String BillingState
        {
            get
            {
                return _BillingState;
            }
            set
            {
                OnBillingStateChanging(value);
                ReportPropertyChanging("BillingState");
                _BillingState = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BillingState");
                OnBillingStateChanged();
            }
        }
        private global::System.String _BillingState;
        partial void OnBillingStateChanging(global::System.String value);
        partial void OnBillingStateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String BillingCountry
        {
            get
            {
                return _BillingCountry;
            }
            set
            {
                OnBillingCountryChanging(value);
                ReportPropertyChanging("BillingCountry");
                _BillingCountry = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BillingCountry");
                OnBillingCountryChanged();
            }
        }
        private global::System.String _BillingCountry;
        partial void OnBillingCountryChanging(global::System.String value);
        partial void OnBillingCountryChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String BillingPostalCode
        {
            get
            {
                return _BillingPostalCode;
            }
            set
            {
                OnBillingPostalCodeChanging(value);
                ReportPropertyChanging("BillingPostalCode");
                _BillingPostalCode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BillingPostalCode");
                OnBillingPostalCodeChanged();
            }
        }
        private global::System.String _BillingPostalCode;
        partial void OnBillingPostalCodeChanging(global::System.String value);
        partial void OnBillingPostalCodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal Total
        {
            get
            {
                return _Total;
            }
            set
            {
                OnTotalChanging(value);
                ReportPropertyChanging("Total");
                _Total = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Total");
                OnTotalChanged();
            }
        }
        private global::System.Decimal _Total;
        partial void OnTotalChanging(global::System.Decimal value);
        partial void OnTotalChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Invoice__Custome__164452B1", "Customer")]
        public Customer Customer
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("ChinookModel.FK__Invoice__Custome__164452B1", "Customer").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("ChinookModel.FK__Invoice__Custome__164452B1", "Customer").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Customer> CustomerReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Customer>("ChinookModel.FK__Invoice__Custome__164452B1", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Customer>("ChinookModel.FK__Invoice__Custome__164452B1", "Customer", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__InvoiceLi__Invoi__182C9B23", "InvoiceLine")]
        public EntityCollection<InvoiceLine> InvoiceLines
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<InvoiceLine>("ChinookModel.FK__InvoiceLi__Invoi__182C9B23", "InvoiceLine");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<InvoiceLine>("ChinookModel.FK__InvoiceLi__Invoi__182C9B23", "InvoiceLine", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="InvoiceLine")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class InvoiceLine : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new InvoiceLine object.
        /// </summary>
        /// <param name="invoiceLineId">Initial value of the InvoiceLineId property.</param>
        /// <param name="unitPrice">Initial value of the UnitPrice property.</param>
        /// <param name="quantity">Initial value of the Quantity property.</param>
        public static InvoiceLine CreateInvoiceLine(global::System.Int32 invoiceLineId, global::System.Decimal unitPrice, global::System.Int32 quantity)
        {
            InvoiceLine invoiceLine = new InvoiceLine();
            invoiceLine.InvoiceLineId = invoiceLineId;
            invoiceLine.UnitPrice = unitPrice;
            invoiceLine.Quantity = quantity;
            return invoiceLine;
        }

        #endregion

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

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__InvoiceLi__Invoi__182C9B23", "Invoice")]
        public Invoice Invoice
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Invoice>("ChinookModel.FK__InvoiceLi__Invoi__182C9B23", "Invoice").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Invoice>("ChinookModel.FK__InvoiceLi__Invoi__182C9B23", "Invoice").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Invoice> InvoiceReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Invoice>("ChinookModel.FK__InvoiceLi__Invoi__182C9B23", "Invoice");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Invoice>("ChinookModel.FK__InvoiceLi__Invoi__182C9B23", "Invoice", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__InvoiceLi__Track__173876EA", "Track")]
        public Track Track
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Track>("ChinookModel.FK__InvoiceLi__Track__173876EA", "Track").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Track>("ChinookModel.FK__InvoiceLi__Track__173876EA", "Track").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Track> TrackReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Track>("ChinookModel.FK__InvoiceLi__Track__173876EA", "Track");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Track>("ChinookModel.FK__InvoiceLi__Track__173876EA", "Track", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="MediaType")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MediaType : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MediaType object.
        /// </summary>
        /// <param name="mediaTypeId">Initial value of the MediaTypeId property.</param>
        public static MediaType CreateMediaType(global::System.Int32 mediaTypeId)
        {
            MediaType mediaType = new MediaType();
            mediaType.MediaTypeId = mediaTypeId;
            return mediaType;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 MediaTypeId
        {
            get
            {
                return _MediaTypeId;
            }
            set
            {
                if (_MediaTypeId != value)
                {
                    OnMediaTypeIdChanging(value);
                    ReportPropertyChanging("MediaTypeId");
                    _MediaTypeId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("MediaTypeId");
                    OnMediaTypeIdChanged();
                }
            }
        }
        private global::System.Int32 _MediaTypeId;
        partial void OnMediaTypeIdChanging(global::System.Int32 value);
        partial void OnMediaTypeIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="Playlist")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Playlist : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Playlist object.
        /// </summary>
        /// <param name="playlistId">Initial value of the PlaylistId property.</param>
        public static Playlist CreatePlaylist(global::System.Int32 playlistId)
        {
            Playlist playlist = new Playlist();
            playlist.PlaylistId = playlistId;
            return playlist;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 PlaylistId
        {
            get
            {
                return _PlaylistId;
            }
            set
            {
                if (_PlaylistId != value)
                {
                    OnPlaylistIdChanging(value);
                    ReportPropertyChanging("PlaylistId");
                    _PlaylistId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("PlaylistId");
                    OnPlaylistIdChanged();
                }
            }
        }
        private global::System.Int32 _PlaylistId;
        partial void OnPlaylistIdChanging(global::System.Int32 value);
        partial void OnPlaylistIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="sysdiagram")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class sysdiagram : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new sysdiagram 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 sysdiagram Createsysdiagram(global::System.String name, global::System.Int32 principal_id, global::System.Int32 diagram_id)
        {
            sysdiagram sysdiagram = new sysdiagram();
            sysdiagram.name = name;
            sysdiagram.principal_id = principal_id;
            sysdiagram.diagram_id = diagram_id;
            return sysdiagram;
        }

        #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

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="ChinookModel", Name="Track")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Track : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Track object.
        /// </summary>
        /// <param name="trackId">Initial value of the TrackId property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="milliseconds">Initial value of the Milliseconds property.</param>
        /// <param name="unitPrice">Initial value of the UnitPrice property.</param>
        public static Track CreateTrack(global::System.Int32 trackId, global::System.String name, global::System.Int32 milliseconds, global::System.Decimal unitPrice)
        {
            Track track = new Track();
            track.TrackId = trackId;
            track.Name = name;
            track.Milliseconds = milliseconds;
            track.UnitPrice = unitPrice;
            return track;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 TrackId
        {
            get
            {
                return _TrackId;
            }
            set
            {
                if (_TrackId != value)
                {
                    OnTrackIdChanging(value);
                    ReportPropertyChanging("TrackId");
                    _TrackId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TrackId");
                    OnTrackIdChanged();
                }
            }
        }
        private global::System.Int32 _TrackId;
        partial void OnTrackIdChanging(global::System.Int32 value);
        partial void OnTrackIdChanged();
    
        /// <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 Composer
        {
            get
            {
                return _Composer;
            }
            set
            {
                OnComposerChanging(value);
                ReportPropertyChanging("Composer");
                _Composer = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Composer");
                OnComposerChanged();
            }
        }
        private global::System.String _Composer;
        partial void OnComposerChanging(global::System.String value);
        partial void OnComposerChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Milliseconds
        {
            get
            {
                return _Milliseconds;
            }
            set
            {
                OnMillisecondsChanging(value);
                ReportPropertyChanging("Milliseconds");
                _Milliseconds = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Milliseconds");
                OnMillisecondsChanged();
            }
        }
        private global::System.Int32 _Milliseconds;
        partial void OnMillisecondsChanging(global::System.Int32 value);
        partial void OnMillisecondsChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> Bytes
        {
            get
            {
                return _Bytes;
            }
            set
            {
                OnBytesChanging(value);
                ReportPropertyChanging("Bytes");
                _Bytes = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Bytes");
                OnBytesChanged();
            }
        }
        private Nullable<global::System.Int32> _Bytes;
        partial void OnBytesChanging(Nullable<global::System.Int32> value);
        partial void OnBytesChanged();
    
        /// <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();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Track__AlbumId__117F9D94", "Album")]
        public Album Album
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Album>("ChinookModel.FK__Track__AlbumId__117F9D94", "Album").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Album>("ChinookModel.FK__Track__AlbumId__117F9D94", "Album").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Album> AlbumReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Album>("ChinookModel.FK__Track__AlbumId__117F9D94", "Album");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Album>("ChinookModel.FK__Track__AlbumId__117F9D94", "Album", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Track__GenreId__1367E606", "Genre")]
        public Genre Genre
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Genre>("ChinookModel.FK__Track__GenreId__1367E606", "Genre").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Genre>("ChinookModel.FK__Track__GenreId__1367E606", "Genre").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Genre> GenreReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Genre>("ChinookModel.FK__Track__GenreId__1367E606", "Genre");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Genre>("ChinookModel.FK__Track__GenreId__1367E606", "Genre", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__InvoiceLi__Track__173876EA", "InvoiceLine")]
        public EntityCollection<InvoiceLine> InvoiceLines
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<InvoiceLine>("ChinookModel.FK__InvoiceLi__Track__173876EA", "InvoiceLine");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<InvoiceLine>("ChinookModel.FK__InvoiceLi__Track__173876EA", "InvoiceLine", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "FK__Track__MediaType__1273C1CD", "MediaType")]
        public MediaType MediaType
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MediaType>("ChinookModel.FK__Track__MediaType__1273C1CD", "MediaType").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MediaType>("ChinookModel.FK__Track__MediaType__1273C1CD", "MediaType").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<MediaType> MediaTypeReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<MediaType>("ChinookModel.FK__Track__MediaType__1273C1CD", "MediaType");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<MediaType>("ChinookModel.FK__Track__MediaType__1273C1CD", "MediaType", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("ChinookModel", "PlaylistTrack", "Playlist")]
        public EntityCollection<Playlist> Playlists
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Playlist>("ChinookModel.PlaylistTrack", "Playlist");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Playlist>("ChinookModel.PlaylistTrack", "Playlist", value);
                }
            }
        }

        #endregion

    }

    #endregion

    
}
