List:Commits« Previous MessageNext Message »
From:Julio Casal Date:June 23 2011 2:06pm
Subject:bzr commit into connector-net-6.4 branch (julio.casal:1009)
View as plain text  
#At file:///D:/Users/jcasalt/Dev/connector-net/6.4/ based on revid:reggie.burnett@stripped6dga7f9zpy

 1009 Julio Casal	2011-06-23 [merge]
      Merged.

    added:
      VS2008/Tests/MySql.Data.Entity.Tests/Model1.Designer.cs
      VS2008/Tests/MySql.Data.Entity.Tests/Model1.edmx
      VS2008/Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs
      VS2008/Tests/MySql.Data.Entity.Tests/TestModel.edmx
    modified:
      CHANGES
      Source/MySql.Data.Entity/Properties/ProviderManifest.xml
      Tests/MySql.Data.Entity.Tests/DataTypeTests.cs
      Tests/MySql.Data.Entity.Tests/InsertTests.cs
      Tests/MySql.Data.Entity.Tests/Model1.Designer.cs
      Tests/MySql.Data.Entity.Tests/Model1.edmx
      Tests/MySql.Data.Entity.Tests/Properties/schema.sql
      Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs
      Tests/MySql.Data.Entity.Tests/TestModel.edmx
      VS2008/Source/MySql.Data.Entity/MySql.Data.Entity.csproj
      VS2008/Tests/MySql.Data.Entity.Tests/MySql.Data.Entity.Tests.csproj
=== modified file 'CHANGES'
--- a/CHANGES	2011-06-21 19:16:59 +0000
+++ b/CHANGES	2011-06-23 14:06:37 +0000
@@ -1,3 +1,4 @@
+- Modified ProviderManifest.xml to map TIMESTAMP db fields to the DateTime .NET type (MySQL bug #55351, Oracle bug #12652602).
 - modified schema1.sql in MySql.Web to remove ENGINE declaration on table creation (Oracle bug #12311974).
 - fixed performance issue with executing stored procedures with output parameters
   (MySQL bug #60366, Oracle bug#12425959)

=== modified file 'Source/MySql.Data.Entity/Properties/ProviderManifest.xml'
--- a/Source/MySql.Data.Entity/Properties/ProviderManifest.xml	2010-09-01 17:50:11 +0000
+++ b/Source/MySql.Data.Entity/Properties/ProviderManifest.xml	2011-06-23 13:59:14 +0000
@@ -39,7 +39,7 @@ PROCESS
         <Scale Minimum="0" Maximum="30" DefaultValue="0" Constant="false" />
       </FacetDescriptions>
     </Type>
-    <Type Name="timestamp" PrimitiveTypeKind="DateTimeOffset">
+    <Type Name="timestamp" PrimitiveTypeKind="DateTime">
       <FacetDescriptions>
         <Precision Minimum="0" Maximum="9" DefaultValue="6" Constant="false" />
       </FacetDescriptions>

=== modified file 'Tests/MySql.Data.Entity.Tests/DataTypeTests.cs'
--- a/Tests/MySql.Data.Entity.Tests/DataTypeTests.cs	2011-06-21 18:51:27 +0000
+++ b/Tests/MySql.Data.Entity.Tests/DataTypeTests.cs	2011-06-23 13:59:14 +0000
@@ -53,6 +53,7 @@ namespace MySql.Data.Entity.Tests
                 c.FirstName = "first";
                 c.LastName = "last";
                 c.BirthTime = birth;
+                c.Modified = DateTime.Now;
                 context.AddToChildren(c);
                 context.SaveChanges();
 
@@ -100,6 +101,7 @@ namespace MySql.Data.Entity.Tests
                     c.FirstName = "Bam bam";
                     c.LastName = "Rubble";
                     c.BirthWeight = 8.65;
+                    c.Modified = DateTime.Now;
                     context.AddToChildren(c);
                     context.SaveChanges();
                 }
@@ -122,12 +124,12 @@ namespace MySql.Data.Entity.Tests
             using (testEntities context = new testEntities())
             {
                 Child c = context.Children.First();
-                DateTime dt = c.Modified.DateTime;
+                DateTime dt = c.Modified;
                 c.Modified = now;
                 context.SaveChanges();
 
                 c = context.Children.First();
-                dt = c.Modified.DateTime;
+                dt = c.Modified;
                 Assert.AreEqual(now, dt);
             }
         }

=== modified file 'Tests/MySql.Data.Entity.Tests/InsertTests.cs'
--- a/Tests/MySql.Data.Entity.Tests/InsertTests.cs	2011-03-03 18:01:04 +0000
+++ b/Tests/MySql.Data.Entity.Tests/InsertTests.cs	2011-06-23 12:11:05 +0000
@@ -76,5 +76,21 @@ namespace MySql.Data.Entity.Tests
                 Assert.AreEqual("44558", lastRow["zipcode"]);
             }
         }
+
+        [Test]
+        public void CanInsertRowWithDefaultTimeStamp()
+        {
+            using (testEntities context = new testEntities())
+            {
+                // The default timestamp is in the CreatedDate column.
+                Product product = new Product();
+                product.Name = "Coca Cola";
+
+                context.AddToProducts(product);
+                context.SaveChanges();
+
+                Assert.AreEqual(DateTime.Today.Day, product.CreatedDate.Day);
+            }
+        }
     }
 }
\ No newline at end of file

=== modified file 'Tests/MySql.Data.Entity.Tests/Model1.Designer.cs'
--- a/Tests/MySql.Data.Entity.Tests/Model1.Designer.cs	2011-06-01 13:47:16 +0000
+++ b/Tests/MySql.Data.Entity.Tests/Model1.Designer.cs	2011-06-23 13:59:14 +0000
@@ -1,113 +1,143 @@
 ï--------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:2.0.50727.5444
+//    This code was generated from a template.
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//    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>
 //------------------------------------------------------------------------------
 
-[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
+using System;
+using System.Data.Objects;
+using System.Data.Objects.DataClasses;
+using System.Data.EntityClient;
+using System.ComponentModel;
+using System.Xml.Serialization;
+using System.Runtime.Serialization;
+
+[assembly: EdmSchemaAttribute()]
 
-// Original file name:
-// Generation date: 5/27/2011 6:15:37 PM
 namespace MySql.Data.Entity.Tests
 {
+    #region Contexts
     
     /// <summary>
-    /// There are no comments for Model1Container in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    public partial class Model1Container : global::System.Data.Objects.ObjectContext
+    public partial class Model1Container : ObjectContext
     {
+        #region Constructors
+    
         /// <summary>
         /// Initializes a new Model1Container object using the connection string found in the 'Model1Container' section of the application configuration file.
         /// </summary>
-        public Model1Container() : 
-                base("name=Model1Container", "Model1Container")
+        public Model1Container() : base("name=Model1Container", "Model1Container")
         {
-            this.OnContextCreated();
+            OnContextCreated();
         }
+    
         /// <summary>
         /// Initialize a new Model1Container object.
         /// </summary>
-        public Model1Container(string connectionString) : 
-                base(connectionString, "Model1Container")
+        public Model1Container(string connectionString) : base(connectionString, "Model1Container")
         {
-            this.OnContextCreated();
+            OnContextCreated();
         }
+    
         /// <summary>
         /// Initialize a new Model1Container object.
         /// </summary>
-        public Model1Container(global::System.Data.EntityClient.EntityConnection connection) : 
-                base(connection, "Model1Container")
+        public Model1Container(EntityConnection connection) : base(connection, "Model1Container")
         {
-            this.OnContextCreated();
+            OnContextCreated();
         }
+    
+        #endregion
+    
+        #region Partial Methods
+    
         partial void OnContextCreated();
+    
+        #endregion
+    
+        #region ObjectSet Properties
+    
         /// <summary>
-        /// There are no comments for Animals in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Animal> Animals
+        public ObjectSet<Animal> Animals
         {
             get
             {
-                if ((this._Animals == null))
+                if ((_Animals == null))
                 {
-                    this._Animals = base.CreateQuery<Animal>("[Animals]");
+                    _Animals = base.CreateObjectSet<Animal>("Animals");
                 }
-                return this._Animals;
+                return _Animals;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Animal> _Animals;
+        private ObjectSet<Animal> _Animals;
+    
         /// <summary>
-        /// There are no comments for Shelters in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Shelter> Shelters
+        public ObjectSet<Shelter> Shelters
         {
             get
             {
-                if ((this._Shelters == null))
+                if ((_Shelters == null))
                 {
-                    this._Shelters = base.CreateQuery<Shelter>("[Shelters]");
+                    _Shelters = base.CreateObjectSet<Shelter>("Shelters");
                 }
-                return this._Shelters;
+                return _Shelters;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Shelter> _Shelters;
+        private ObjectSet<Shelter> _Shelters;
+
+        #endregion
+        #region AddTo Methods
+    
         /// <summary>
-        /// There are no comments for Animals in the schema.
+        /// Deprecated Method for adding a new object to the Animals EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToAnimals(Animal animal)
         {
             base.AddObject("Animals", animal);
         }
+    
         /// <summary>
-        /// There are no comments for Shelters in the schema.
+        /// Deprecated Method for adding a new object to the Shelters EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToShelters(Shelter shelter)
         {
             base.AddObject("Shelters", shelter);
         }
+
+        #endregion
     }
+    
+
+    #endregion
+    
+    #region Entities
+    
     /// <summary>
-    /// There are no comments for Model1.Animal in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="Model1", Name="Animal")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Animal : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="Model1", Name="Animal")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Animal : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
         /// Create a new Animal object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="name">Initial value of Name.</param>
-        /// <param name="shelterId">Initial value of ShelterId.</param>
-        public static Animal CreateAnimal(int id, string name, int shelterId)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        /// <param name="shelterId">Initial value of the ShelterId property.</param>
+        public static Animal CreateAnimal(global::System.Int32 id, global::System.String name, global::System.Int32 shelterId)
         {
             Animal animal = new Animal();
             animal.Id = id;
@@ -115,119 +145,144 @@ namespace MySql.Data.Entity.Tests
             animal.ShelterId = shelterId;
             return animal;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._Name;
+                return _Name;
             }
             set
             {
-                this.OnNameChanging(value);
-                this.ReportPropertyChanging("Name");
-                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Name");
-                this.OnNameChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private string _Name;
-        partial void OnNameChanging(string value);
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
         partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property ShelterId in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int ShelterId
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 ShelterId
         {
             get
             {
-                return this._ShelterId;
+                return _ShelterId;
             }
             set
             {
-                this.OnShelterIdChanging(value);
-                this.ReportPropertyChanging("ShelterId");
-                this._ShelterId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("ShelterId");
-                this.OnShelterIdChanged();
+                OnShelterIdChanging(value);
+                ReportPropertyChanging("ShelterId");
+                _ShelterId = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("ShelterId");
+                OnShelterIdChanged();
             }
         }
-        private int _ShelterId;
-        partial void OnShelterIdChanging(int value);
+        private global::System.Int32 _ShelterId;
+        partial void OnShelterIdChanging(global::System.Int32 value);
         partial void OnShelterIdChanged();
+
+        #endregion
+    
     }
+    
     /// <summary>
-    /// There are no comments for Model1.Shelter in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="Model1", Name="Shelter")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Shelter : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="Model1", Name="Shelter")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Shelter : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
         /// Create a new Shelter object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        public static Shelter CreateShelter(int id)
+        /// <param name="id">Initial value of the Id property.</param>
+        public static Shelter CreateShelter(global::System.Int32 id)
         {
             Shelter shelter = new Shelter();
             shelter.Id = id;
             return shelter;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+
+        #endregion
+    
     }
+
+    #endregion
+    
 }

=== modified file 'Tests/MySql.Data.Entity.Tests/Model1.edmx'
--- a/Tests/MySql.Data.Entity.Tests/Model1.edmx	2011-06-01 13:47:16 +0000
+++ b/Tests/MySql.Data.Entity.Tests/Model1.edmx	2011-06-23 13:59:14 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
+<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
   <!-- EF Runtime content -->
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl" Namespace="Model1.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5">
+      <Schema xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl" Namespace="Model1.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator">
         <EntityContainer Name="Model1TargetContainer" >
           <EntitySet Name="Animals" EntityType="Model1.Store.TheAnimals" />
           <EntitySet Name="Facilities" EntityType="Model1.Store.Facility" />
@@ -27,7 +27,7 @@ <?xml version="1.0" encoding="utf-8"?
     </edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
-      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm" xmlns:cg="http://schemas.microsoft.com/ado/2006/04/codegeneration" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" Namespace="Model1" Alias="Self">
+      <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" Namespace="Model1" Alias="Self">
         <EntityContainer Name="Model1Container" >
           <EntitySet Name="Animals" EntityType="Model1.Animal" />
           <EntitySet Name="Shelters" EntityType="Model1.Shelter" />
@@ -50,7 +50,7 @@ <?xml version="1.0" encoding="utf-8"?
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
     <edmx:Mappings>
-      <Mapping xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS" Space="C-S">
+      <Mapping xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs" Space="C-S">
         <Alias Key="Model" Value="Model1" />
         <Alias Key="Target" Value="Model1.Store" />
         <EntityContainerMapping CdmEntityContainer="Model1Container" StorageEntityContainer="Model1TargetContainer">
@@ -67,7 +67,7 @@ <?xml version="1.0" encoding="utf-8"?
     </edmx:Mappings>
   </edmx:Runtime>
   <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
-  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2007/06/edmx">
+  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
     <edmx:Connection>
       <DesignerInfoPropertySet>
         <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />

=== modified file 'Tests/MySql.Data.Entity.Tests/Properties/schema.sql'
--- a/Tests/MySql.Data.Entity.Tests/Properties/schema.sql	2011-06-02 18:02:31 +0000
+++ b/Tests/MySql.Data.Entity.Tests/Properties/schema.sql	2011-06-23 13:59:14 +0000
@@ -1,3 +1,4 @@
+DROP TABLE IF EXISTS Products;
 DROP TABLE IF EXISTS SalariedEmployees;
 DROP TABLE IF EXISTS Employees;
 DROP TABLE IF EXISTS EmployeeChildren;
@@ -194,3 +195,8 @@ INSERT INTO DataTypeTests VALUES (@guid,
 INSERT INTO DataTypeTests VALUES ('481A6506-03A3-4ef9-A05A-B247E75A2FB4',
 	'481A6506-03A3-4ef9-A05A-B247E75A2FB4', '481A6506-03A3-4ef9-A05A-B247E75A2FB4');
 
+CREATE  TABLE Products (
+  Id INT NOT NULL AUTO_INCREMENT,
+  Name VARCHAR(45) NOT NULL,
+  CreatedDate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (Id));
\ No newline at end of file

=== modified file 'Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs'
--- a/Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs	2011-06-02 19:46:44 +0000
+++ b/Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs	2011-06-23 13:59:14 +0000
@@ -1,2042 +1,2432 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:2.0.50727.5444
+//    This code was generated from a template.
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//    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>
 //------------------------------------------------------------------------------
 
-[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
-[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Toys_Supplier", "Supplier", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Company), "Toys", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Toy))]
-[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Orders_Store", "Store", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Store), "Orders", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Order))]
-[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Books_Authors", "Authors", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Author), "Books", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Book))]
-[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Books_Publishers", "Publishers", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Publisher), "Books", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Book))]
+using System;
+using System.Data.Objects;
+using System.Data.Objects.DataClasses;
+using System.Data.EntityClient;
+using System.ComponentModel;
+using System.Xml.Serialization;
+using System.Runtime.Serialization;
+
+[assembly: EdmSchemaAttribute()]
+#region EDM Relationship Metadata
+
+[assembly: EdmRelationshipAttribute("testModel", "FK_Toys_Supplier", "Supplier", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Company), "Toys", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Toy))]
+[assembly: EdmRelationshipAttribute("testModel", "FK_Orders_Store", "Store", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Store), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Order))]
+[assembly: EdmRelationshipAttribute("testModel", "FK_Books_Authors", "Authors", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Author), "Books", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Book))]
+[assembly: EdmRelationshipAttribute("testModel", "FK_Books_Publishers", "Publishers", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Publisher), "Books", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Book))]
+
+#endregion
 
-// Original file name:
-// Generation date: 6/2/2011 2:42:00 PM
 namespace MySql.Data.Entity.Tests
 {
+    #region Contexts
     
     /// <summary>
-    /// There are no comments for testEntities in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    public partial class testEntities : global::System.Data.Objects.ObjectContext
+    public partial class testEntities : ObjectContext
     {
+        #region Constructors
+    
         /// <summary>
         /// Initializes a new testEntities object using the connection string found in the 'testEntities' section of the application configuration file.
         /// </summary>
-        public testEntities() : 
-                base("name=testEntities", "testEntities")
+        public testEntities() : base("name=testEntities", "testEntities")
         {
-            this.OnContextCreated();
+            OnContextCreated();
         }
+    
         /// <summary>
         /// Initialize a new testEntities object.
         /// </summary>
-        public testEntities(string connectionString) : 
-                base(connectionString, "testEntities")
+        public testEntities(string connectionString) : base(connectionString, "testEntities")
         {
-            this.OnContextCreated();
+            OnContextCreated();
         }
+    
         /// <summary>
         /// Initialize a new testEntities object.
         /// </summary>
-        public testEntities(global::System.Data.EntityClient.EntityConnection connection) : 
-                base(connection, "testEntities")
+        public testEntities(EntityConnection connection) : base(connection, "testEntities")
         {
-            this.OnContextCreated();
+            OnContextCreated();
         }
+    
+        #endregion
+    
+        #region Partial Methods
+    
         partial void OnContextCreated();
+    
+        #endregion
+    
+        #region ObjectSet Properties
+    
+        /// <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>
-        /// There are no comments for Employees in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Employee> Employees
+        public ObjectSet<Child> Children
         {
             get
             {
-                if ((this._Employees == null))
+                if ((_Children == null))
                 {
-                    this._Employees = base.CreateQuery<Employee>("[Employees]");
+                    _Children = base.CreateObjectSet<Child>("Children");
                 }
-                return this._Employees;
+                return _Children;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Employee> _Employees;
+        private ObjectSet<Child> _Children;
+    
         /// <summary>
-        /// There are no comments for Children in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Child> Children
+        public ObjectSet<Company> Companies
         {
             get
             {
-                if ((this._Children == null))
+                if ((_Companies == null))
                 {
-                    this._Children = base.CreateQuery<Child>("[Children]");
+                    _Companies = base.CreateObjectSet<Company>("Companies");
                 }
-                return this._Children;
+                return _Companies;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Child> _Children;
+        private ObjectSet<Company> _Companies;
+    
         /// <summary>
-        /// There are no comments for Companies in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Company> Companies
+        public ObjectSet<Toy> Toys
         {
             get
             {
-                if ((this._Companies == null))
+                if ((_Toys == null))
                 {
-                    this._Companies = base.CreateQuery<Company>("[Companies]");
+                    _Toys = base.CreateObjectSet<Toy>("Toys");
                 }
-                return this._Companies;
+                return _Toys;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Company> _Companies;
+        private ObjectSet<Toy> _Toys;
+    
         /// <summary>
-        /// There are no comments for Toys in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Toy> Toys
+        public ObjectSet<Store> Stores
         {
             get
             {
-                if ((this._Toys == null))
+                if ((_Stores == null))
                 {
-                    this._Toys = base.CreateQuery<Toy>("[Toys]");
+                    _Stores = base.CreateObjectSet<Store>("Stores");
                 }
-                return this._Toys;
+                return _Stores;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Toy> _Toys;
+        private ObjectSet<Store> _Stores;
+    
         /// <summary>
-        /// There are no comments for Stores in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Store> Stores
+        public ObjectSet<Order> Orders
         {
             get
             {
-                if ((this._Stores == null))
+                if ((_Orders == null))
                 {
-                    this._Stores = base.CreateQuery<Store>("[Stores]");
+                    _Orders = base.CreateObjectSet<Order>("Orders");
                 }
-                return this._Stores;
+                return _Orders;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Store> _Stores;
+        private ObjectSet<Order> _Orders;
+    
         /// <summary>
-        /// There are no comments for Orders in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Order> Orders
+        public ObjectSet<Book> Books
         {
             get
             {
-                if ((this._Orders == null))
+                if ((_Books == null))
                 {
-                    this._Orders = base.CreateQuery<Order>("[Orders]");
+                    _Books = base.CreateObjectSet<Book>("Books");
                 }
-                return this._Orders;
+                return _Books;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Order> _Orders;
+        private ObjectSet<Book> _Books;
+    
         /// <summary>
-        /// There are no comments for Books in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Book> Books
+        public ObjectSet<Author> Authors
         {
             get
             {
-                if ((this._Books == null))
+                if ((_Authors == null))
                 {
-                    this._Books = base.CreateQuery<Book>("[Books]");
+                    _Authors = base.CreateObjectSet<Author>("Authors");
                 }
-                return this._Books;
+                return _Authors;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Book> _Books;
+        private ObjectSet<Author> _Authors;
+    
         /// <summary>
-        /// There are no comments for Authors in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Author> Authors
+        public ObjectSet<Publisher> Publishers
         {
             get
             {
-                if ((this._Authors == null))
+                if ((_Publishers == null))
                 {
-                    this._Authors = base.CreateQuery<Author>("[Authors]");
+                    _Publishers = base.CreateObjectSet<Publisher>("Publishers");
                 }
-                return this._Authors;
+                return _Publishers;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Author> _Authors;
+        private ObjectSet<Publisher> _Publishers;
+    
         /// <summary>
-        /// There are no comments for Publishers in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Publisher> Publishers
+        public ObjectSet<DataTypeTest> DataTypeTests
         {
             get
             {
-                if ((this._Publishers == null))
+                if ((_DataTypeTests == null))
                 {
-                    this._Publishers = base.CreateQuery<Publisher>("[Publishers]");
+                    _DataTypeTests = base.CreateObjectSet<DataTypeTest>("DataTypeTests");
                 }
-                return this._Publishers;
+                return _DataTypeTests;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Publisher> _Publishers;
+        private ObjectSet<DataTypeTest> _DataTypeTests;
+    
         /// <summary>
-        /// There are no comments for DataTypeTests in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<DataTypeTest> DataTypeTests
+        public ObjectSet<Computer> Computers
         {
             get
             {
-                if ((this._DataTypeTests == null))
+                if ((_Computers == null))
                 {
-                    this._DataTypeTests = base.CreateQuery<DataTypeTest>("[DataTypeTests]");
+                    _Computers = base.CreateObjectSet<Computer>("Computers");
                 }
-                return this._DataTypeTests;
+                return _Computers;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<DataTypeTest> _DataTypeTests;
+        private ObjectSet<Computer> _Computers;
+    
         /// <summary>
-        /// There are no comments for Computers in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        public global::System.Data.Objects.ObjectQuery<Computer> Computers
+        public ObjectSet<Product> Products
         {
             get
             {
-                if ((this._Computers == null))
+                if ((_Products == null))
                 {
-                    this._Computers = base.CreateQuery<Computer>("[Computers]");
+                    _Products = base.CreateObjectSet<Product>("Products");
                 }
-                return this._Computers;
+                return _Products;
             }
         }
-        private global::System.Data.Objects.ObjectQuery<Computer> _Computers;
+        private ObjectSet<Product> _Products;
+
+        #endregion
+        #region AddTo Methods
+    
         /// <summary>
-        /// There are no comments for Employees in the schema.
+        /// 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>
-        /// There are no comments for Children in the schema.
+        /// Deprecated Method for adding a new object to the Children EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToChildren(Child child)
         {
             base.AddObject("Children", child);
         }
+    
         /// <summary>
-        /// There are no comments for Companies in the schema.
+        /// Deprecated Method for adding a new object to the Companies EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToCompanies(Company company)
         {
             base.AddObject("Companies", company);
         }
+    
         /// <summary>
-        /// There are no comments for Toys in the schema.
+        /// Deprecated Method for adding a new object to the Toys EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToToys(Toy toy)
         {
             base.AddObject("Toys", toy);
         }
+    
         /// <summary>
-        /// There are no comments for Stores in the schema.
+        /// Deprecated Method for adding a new object to the Stores EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToStores(Store store)
         {
             base.AddObject("Stores", store);
         }
+    
         /// <summary>
-        /// There are no comments for Orders in the schema.
+        /// Deprecated Method for adding a new object to the Orders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToOrders(Order order)
         {
             base.AddObject("Orders", order);
         }
+    
         /// <summary>
-        /// There are no comments for Books in the schema.
+        /// Deprecated Method for adding a new object to the Books EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToBooks(Book book)
         {
             base.AddObject("Books", book);
         }
+    
         /// <summary>
-        /// There are no comments for Authors in the schema.
+        /// Deprecated Method for adding a new object to the Authors EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToAuthors(Author author)
         {
             base.AddObject("Authors", author);
         }
+    
         /// <summary>
-        /// There are no comments for Publishers in the schema.
+        /// Deprecated Method for adding a new object to the Publishers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToPublishers(Publisher publisher)
         {
             base.AddObject("Publishers", publisher);
         }
+    
         /// <summary>
-        /// There are no comments for DataTypeTests in the schema.
+        /// Deprecated Method for adding a new object to the DataTypeTests EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToDataTypeTests(DataTypeTest dataTypeTest)
         {
             base.AddObject("DataTypeTests", dataTypeTest);
         }
+    
         /// <summary>
-        /// There are no comments for Computers in the schema.
+        /// Deprecated Method for adding a new object to the Computers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
         /// </summary>
         public void AddToComputers(Computer computer)
         {
             base.AddObject("Computers", computer);
         }
+    
+        /// <summary>
+        /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
+        /// </summary>
+        public void AddToProducts(Product product)
+        {
+            base.AddObject("Products", product);
+        }
+
+        #endregion
     }
+    
+
+    #endregion
+    
+    #region Entities
+    
     /// <summary>
-    /// There are no comments for testModel.Employee in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Employee")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.SalariedEmployee))]
-    public partial class Employee : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Author")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Author : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Employee object.
+        /// Create a new Author object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="lastName">Initial value of LastName.</param>
-        /// <param name="firstName">Initial value of FirstName.</param>
-        public static Employee CreateEmployee(int id, string lastName, string firstName)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        public static Author CreateAuthor(global::System.Int32 id, global::System.String name)
         {
-            Employee employee = new Employee();
-            employee.Id = id;
-            employee.LastName = lastName;
-            employee.FirstName = firstName;
-            return employee;
+            Author author = new Author();
+            author.Id = id;
+            author.Name = name;
+            return author;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property LastName in the schema.
-        /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string LastName
-        {
-            get
-            {
-                return this._LastName;
-            }
-            set
-            {
-                this.OnLastNameChanging(value);
-                this.ReportPropertyChanging("LastName");
-                this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("LastName");
-                this.OnLastNameChanged();
-            }
-        }
-        private string _LastName;
-        partial void OnLastNameChanging(string value);
-        partial void OnLastNameChanged();
-        /// <summary>
-        /// There are no comments for Property FirstName in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string FirstName
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._FirstName;
+                return _Name;
             }
             set
             {
-                this.OnFirstNameChanging(value);
-                this.ReportPropertyChanging("FirstName");
-                this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("FirstName");
-                this.OnFirstNameChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private string _FirstName;
-        partial void OnFirstNameChanging(string value);
-        partial void OnFirstNameChanged();
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
+        partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property Age in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<int> Age
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Int32> Age
         {
             get
             {
-                return this._Age;
+                return _Age;
             }
             set
             {
-                this.OnAgeChanging(value);
-                this.ReportPropertyChanging("Age");
-                this._Age = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Age");
-                this.OnAgeChanged();
+                OnAgeChanging(value);
+                ReportPropertyChanging("Age");
+                _Age = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("Age");
+                OnAgeChanged();
             }
         }
-        private global::System.Nullable<int> _Age;
-        partial void OnAgeChanging(global::System.Nullable<int> value);
+        private Nullable<global::System.Int32> _Age;
+        partial void OnAgeChanging(Nullable<global::System.Int32> value);
         partial void OnAgeChanged();
-    }
-    /// <summary>
-    /// There are no comments for testModel.SalariedEmployee in the schema.
-    /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="SalariedEmployee")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class SalariedEmployee : Employee
-    {
-        /// <summary>
-        /// Create a new SalariedEmployee object.
-        /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="lastName">Initial value of LastName.</param>
-        /// <param name="firstName">Initial value of FirstName.</param>
-        /// <param name="salary">Initial value of Salary.</param>
-        public static SalariedEmployee CreateSalariedEmployee(int id, string lastName, string firstName, int salary)
-        {
-            SalariedEmployee salariedEmployee = new SalariedEmployee();
-            salariedEmployee.Id = id;
-            salariedEmployee.LastName = lastName;
-            salariedEmployee.FirstName = firstName;
-            salariedEmployee.Salary = salary;
-            return salariedEmployee;
-        }
+
+        #endregion
+    
+        #region Navigation Properties
+    
         /// <summary>
-        /// There are no comments for Property Salary in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Salary
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Authors", "Books")]
+        public EntityCollection<Book> Books
         {
             get
             {
-                return this._Salary;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Book>("testModel.FK_Books_Authors", "Books");
             }
             set
             {
-                this.OnSalaryChanging(value);
-                this.ReportPropertyChanging("Salary");
-                this._Salary = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Salary");
-                this.OnSalaryChanged();
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Book>("testModel.FK_Books_Authors", "Books", value);
+                }
             }
         }
-        private int _Salary;
-        partial void OnSalaryChanging(int value);
-        partial void OnSalaryChanged();
+
+        #endregion
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Child in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Child")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Child : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Book")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Book : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Child object.
+        /// Create a new Book object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="employeeID">Initial value of EmployeeID.</param>
-        /// <param name="lastName">Initial value of LastName.</param>
-        /// <param name="firstName">Initial value of FirstName.</param>
-        /// <param name="modified">Initial value of Modified.</param>
-        public static Child CreateChild(long id, int employeeID, string lastName, string firstName, global::System.DateTimeOffset modified)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        /// <param name="pages">Initial value of the Pages property.</param>
+        public static Book CreateBook(global::System.Int32 id, global::System.String name, global::System.Int32 pages)
         {
-            Child child = new Child();
-            child.Id = id;
-            child.EmployeeID = employeeID;
-            child.LastName = lastName;
-            child.FirstName = firstName;
-            child.Modified = modified;
-            return child;
+            Book book = new Book();
+            book.Id = id;
+            book.Name = name;
+            book.Pages = pages;
+            return book;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public long Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private long _Id;
-        partial void OnIdChanging(long value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property EmployeeID in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int EmployeeID
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._EmployeeID;
+                return _Name;
             }
             set
             {
-                this.OnEmployeeIDChanging(value);
-                this.ReportPropertyChanging("EmployeeID");
-                this._EmployeeID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("EmployeeID");
-                this.OnEmployeeIDChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private int _EmployeeID;
-        partial void OnEmployeeIDChanging(int value);
-        partial void OnEmployeeIDChanged();
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
+        partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property LastName in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string LastName
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Pages
         {
             get
             {
-                return this._LastName;
+                return _Pages;
             }
             set
             {
-                this.OnLastNameChanging(value);
-                this.ReportPropertyChanging("LastName");
-                this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("LastName");
-                this.OnLastNameChanged();
+                OnPagesChanging(value);
+                ReportPropertyChanging("Pages");
+                _Pages = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("Pages");
+                OnPagesChanged();
             }
         }
-        private string _LastName;
-        partial void OnLastNameChanging(string value);
-        partial void OnLastNameChanged();
+        private global::System.Int32 _Pages;
+        partial void OnPagesChanging(global::System.Int32 value);
+        partial void OnPagesChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
         /// <summary>
-        /// There are no comments for Property FirstName in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string FirstName
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Authors", "Authors")]
+        public Author Author
         {
             get
             {
-                return this._FirstName;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors").Value;
             }
             set
             {
-                this.OnFirstNameChanging(value);
-                this.ReportPropertyChanging("FirstName");
-                this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("FirstName");
-                this.OnFirstNameChanged();
+                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors").Value = value;
             }
         }
-        private string _FirstName;
-        partial void OnFirstNameChanging(string value);
-        partial void OnFirstNameChanged();
         /// <summary>
-        /// There are no comments for Property BirthTime in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<global::System.TimeSpan> BirthTime
+        [BrowsableAttribute(false)]
+        [DataMemberAttribute()]
+        public EntityReference<Author> AuthorReference
         {
             get
             {
-                return this._BirthTime;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors");
             }
             set
             {
-                this.OnBirthTimeChanging(value);
-                this.ReportPropertyChanging("BirthTime");
-                this._BirthTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("BirthTime");
-                this.OnBirthTimeChanged();
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Author>("testModel.FK_Books_Authors", "Authors", value);
+                }
             }
         }
-        private global::System.Nullable<global::System.TimeSpan> _BirthTime;
-        partial void OnBirthTimeChanging(global::System.Nullable<global::System.TimeSpan> value);
-        partial void OnBirthTimeChanged();
+    
         /// <summary>
-        /// There are no comments for Property BirthWeight in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<double> BirthWeight
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Publishers", "Publishers")]
+        public Publisher Publisher
         {
             get
             {
-                return this._BirthWeight;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers").Value;

             }
             set
             {
-                this.OnBirthWeightChanging(value);
-                this.ReportPropertyChanging("BirthWeight");
-                this._BirthWeight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("BirthWeight");
-                this.OnBirthWeightChanged();
+                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers").Value = value;
             }
         }
-        private global::System.Nullable<double> _BirthWeight;
-        partial void OnBirthWeightChanging(global::System.Nullable<double> value);
-        partial void OnBirthWeightChanged();
         /// <summary>
-        /// There are no comments for Property Modified in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.DateTimeOffset Modified
+        [BrowsableAttribute(false)]
+        [DataMemberAttribute()]
+        public EntityReference<Publisher> PublisherReference
         {
             get
             {
-                return this._Modified;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers");
             }
             set
             {
-                this.OnModifiedChanging(value);
-                this.ReportPropertyChanging("Modified");
-                this._Modified = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Modified");
-                this.OnModifiedChanged();
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers", value);
+                }
             }
         }
-        private global::System.DateTimeOffset _Modified;
-        partial void OnModifiedChanging(global::System.DateTimeOffset value);
-        partial void OnModifiedChanged();
+
+        #endregion
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Company in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Company")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Company : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Child")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Child : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Company object.
+        /// Create a new Child object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="name">Initial value of Name.</param>
-        /// <param name="address">Initial value of Address.</param>
-        public static Company CreateCompany(int id, string name, CommonAddress address)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <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>
+        /// <param name="modified">Initial value of the Modified property.</param>
+        public static Child CreateChild(global::System.Int64 id, global::System.Int32 employeeID, global::System.String lastName, global::System.String firstName, global::System.DateTime modified)
         {
-            Company company = new Company();
-            company.Id = id;
-            company.Name = name;
-            company.Address = global::System.Data.Objects.DataClasses.StructuralObject.VerifyComplexObjectIsNotNull(address, "Address");
-            return company;
+            Child child = new Child();
+            child.Id = id;
+            child.EmployeeID = employeeID;
+            child.LastName = lastName;
+            child.FirstName = firstName;
+            child.Modified = modified;
+            return child;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int64 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int64 _Id;
+        partial void OnIdChanging(global::System.Int64 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 EmployeeID
         {
             get
             {
-                return this._Name;
+                return _EmployeeID;
             }
             set
             {
-                this.OnNameChanging(value);
-                this.ReportPropertyChanging("Name");
-                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Name");
-                this.OnNameChanged();
+                OnEmployeeIDChanging(value);
+                ReportPropertyChanging("EmployeeID");
+                _EmployeeID = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("EmployeeID");
+                OnEmployeeIDChanged();
             }
         }
-        private string _Name;
-        partial void OnNameChanging(string value);
-        partial void OnNameChanged();
+        private global::System.Int32 _EmployeeID;
+        partial void OnEmployeeIDChanging(global::System.Int32 value);
+        partial void OnEmployeeIDChanged();
+    
         /// <summary>
-        /// There are no comments for Property DateBegan in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<global::System.DateTime> DateBegan
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String LastName
         {
             get
             {
-                return this._DateBegan;
+                return _LastName;
             }
             set
             {
-                this.OnDateBeganChanging(value);
-                this.ReportPropertyChanging("DateBegan");
-                this._DateBegan = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("DateBegan");
-                this.OnDateBeganChanged();
+                OnLastNameChanging(value);
+                ReportPropertyChanging("LastName");
+                _LastName = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("LastName");
+                OnLastNameChanged();
             }
         }
-        private global::System.Nullable<global::System.DateTime> _DateBegan;
-        partial void OnDateBeganChanging(global::System.Nullable<global::System.DateTime> value);
-        partial void OnDateBeganChanged();
+        private global::System.String _LastName;
+        partial void OnLastNameChanging(global::System.String value);
+        partial void OnLastNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property NumEmployees in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<int> NumEmployees
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String FirstName
         {
             get
             {
-                return this._NumEmployees;
+                return _FirstName;
             }
             set
             {
-                this.OnNumEmployeesChanging(value);
-                this.ReportPropertyChanging("NumEmployees");
-                this._NumEmployees = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("NumEmployees");
-                this.OnNumEmployeesChanged();
+                OnFirstNameChanging(value);
+                ReportPropertyChanging("FirstName");
+                _FirstName = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("FirstName");
+                OnFirstNameChanged();
             }
         }
-        private global::System.Nullable<int> _NumEmployees;
-        partial void OnNumEmployeesChanging(global::System.Nullable<int> value);
-        partial void OnNumEmployeesChanged();
+        private global::System.String _FirstName;
+        partial void OnFirstNameChanging(global::System.String value);
+        partial void OnFirstNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property Address in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
-        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
-        [global::System.Xml.Serialization.XmlElement(IsNullable=true)]
-        [global::System.Xml.Serialization.SoapElement(IsNullable=true)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public CommonAddress Address
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.TimeSpan> BirthTime
         {
             get
             {
-                this._Address = this.GetValidValue(this._Address, "Address", false, this._AddressInitialized);
-                this._AddressInitialized = true;
-                return this._Address;
+                return _BirthTime;
             }
             set
             {
-                this.OnAddressChanging(value);
-                this.ReportPropertyChanging("Address");
-                this._Address = this.SetValidValue(this._Address, value, "Address");
-                this._AddressInitialized = true;
-                this.ReportPropertyChanged("Address");
-                this.OnAddressChanged();
+                OnBirthTimeChanging(value);
+                ReportPropertyChanging("BirthTime");
+                _BirthTime = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("BirthTime");
+                OnBirthTimeChanged();
             }
         }
-        private CommonAddress _Address;
-        private bool _AddressInitialized;
-        partial void OnAddressChanging(CommonAddress value);
-        partial void OnAddressChanged();
+        private Nullable<global::System.TimeSpan> _BirthTime;
+        partial void OnBirthTimeChanging(Nullable<global::System.TimeSpan> value);
+        partial void OnBirthTimeChanged();
+    
         /// <summary>
-        /// There are no comments for Toys in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Toys_Supplier", "Toys")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityCollection<Toy> Toys
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Double> BirthWeight
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Toy>("testModel.FK_Toys_Supplier", "Toys");
+                return _BirthWeight;
             }
             set
             {
-                if ((value != null))
-                {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Toy>("testModel.FK_Toys_Supplier", "Toys", value);
-                }
+                OnBirthWeightChanging(value);
+                ReportPropertyChanging("BirthWeight");
+                _BirthWeight = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("BirthWeight");
+                OnBirthWeightChanged();
+            }
+        }
+        private Nullable<global::System.Double> _BirthWeight;
+        partial void OnBirthWeightChanging(Nullable<global::System.Double> value);
+        partial void OnBirthWeightChanged();
+    
+        /// <summary>
+        /// No Metadata Documentation available.

+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.DateTime Modified
+        {
+            get
+            {
+                return _Modified;
+            }
+            set
+            {
+                OnModifiedChanging(value);
+                ReportPropertyChanging("Modified");
+                _Modified = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("Modified");
+                OnModifiedChanged();
             }
         }
+        private global::System.DateTime _Modified;
+        partial void OnModifiedChanging(global::System.DateTime value);
+        partial void OnModifiedChanged();
+
+        #endregion
+    
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Toy in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Toy")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Toy : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Company")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Company : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Toy object.
+        /// Create a new Company object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="name">Initial value of Name.</param>
-        /// <param name="minAge">Initial value of MinAge.</param>
-        public static Toy CreateToy(int id, string name, int minAge)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        /// <param name="address">Initial value of the Address property.</param>
+        public static Company CreateCompany(global::System.Int32 id, global::System.String name, CommonAddress address)
         {
-            Toy toy = new Toy();
-            toy.Id = id;
-            toy.Name = name;
-            toy.MinAge = minAge;
-            return toy;
+            Company company = new Company();
+            company.Id = id;
+            company.Name = name;
+            company.Address = StructuralObject.VerifyComplexObjectIsNotNull(address, "Address");
+            return company;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._Name;
+                return _Name;
             }
             set
             {
-                this.OnNameChanging(value);
-                this.ReportPropertyChanging("Name");
-                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Name");
-                this.OnNameChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private string _Name;
-        partial void OnNameChanging(string value);
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
         partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property MinAge in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int MinAge
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.DateTime> DateBegan
         {
             get
             {
-                return this._MinAge;
+                return _DateBegan;
             }
             set
             {
-                this.OnMinAgeChanging(value);
-                this.ReportPropertyChanging("MinAge");
-                this._MinAge = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("MinAge");
-                this.OnMinAgeChanged();
+                OnDateBeganChanging(value);
+                ReportPropertyChanging("DateBegan");
+                _DateBegan = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("DateBegan");
+                OnDateBeganChanged();
             }
         }
-        private int _MinAge;
-        partial void OnMinAgeChanging(int value);
-        partial void OnMinAgeChanged();
+        private Nullable<global::System.DateTime> _DateBegan;
+        partial void OnDateBeganChanging(Nullable<global::System.DateTime> value);
+        partial void OnDateBeganChanged();
+    
         /// <summary>
-        /// There are no comments for Supplier in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Toys_Supplier", "Supplier")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public Company Supplier
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Int32> NumEmployees
+        {
+            get
+            {
+                return _NumEmployees;
+            }
+            set
+            {
+                OnNumEmployeesChanging(value);
+                ReportPropertyChanging("NumEmployees");
+                _NumEmployees = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("NumEmployees");
+                OnNumEmployeesChanged();
+            }
+        }
+        private Nullable<global::System.Int32> _NumEmployees;
+        partial void OnNumEmployeesChanging(Nullable<global::System.Int32> value);
+        partial void OnNumEmployeesChanged();
+
+        #endregion
+        #region Complex Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmComplexPropertyAttribute()]
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+        [XmlElement(IsNullable=true)]
+        [SoapElement(IsNullable=true)]
+        [DataMemberAttribute()]
+        public CommonAddress Address
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier").Value;
+                _Address = GetValidValue(_Address, "Address", false, _AddressInitialized);
+                _AddressInitialized = true;
+                return _Address;
             }
             set
             {
-                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier").Value = value;
+                OnAddressChanging(value);
+                ReportPropertyChanging("Address");
+                _Address = SetValidValue(_Address, value, "Address");
+                _AddressInitialized = true;
+                ReportPropertyChanged("Address");
+                OnAddressChanged();
             }
         }
+        private CommonAddress _Address;
+        private bool _AddressInitialized;
+        partial void OnAddressChanging(CommonAddress value);
+        partial void OnAddressChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
         /// <summary>
-        /// There are no comments for Supplier in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.ComponentModel.BrowsableAttribute(false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityReference<Company> SupplierReference
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Toys_Supplier", "Toys")]
+        public EntityCollection<Toy> Toys
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier");
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Toy>("testModel.FK_Toys_Supplier", "Toys");
             }
             set
             {
                 if ((value != null))
                 {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier", value);
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Toy>("testModel.FK_Toys_Supplier", "Toys", value);
                 }
             }
         }
+
+        #endregion
     }
+    
     /// <summary>
-    /// There are no comments for ComplexType testModel.CommonAddress in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName="testModel", Name="CommonAddress")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class CommonAddress : global::System.Data.Objects.DataClasses.ComplexObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Computer")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    [KnownTypeAttribute(typeof(DesktopComputer))]
+    [KnownTypeAttribute(typeof(LaptopComputer))]
+    [KnownTypeAttribute(typeof(TabletComputer))]
+    public abstract partial class Computer : EntityObject
     {
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Address in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Address
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Brand
         {
             get
             {
-                return this._Address;
+                return _Brand;
             }
             set
             {
-                this.OnAddressChanging(value);
-                this.ReportPropertyChanging("Address");
-                this._Address = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("Address");
-                this.OnAddressChanged();
+                OnBrandChanging(value);
+                ReportPropertyChanging("Brand");
+                _Brand = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Brand");
+                OnBrandChanged();
             }
         }
-        private string _Address;
-        partial void OnAddressChanging(string value);
-        partial void OnAddressChanged();
+        private global::System.String _Brand;
+        partial void OnBrandChanging(global::System.String value);
+        partial void OnBrandChanged();
+    
         /// <summary>
-        /// There are no comments for Property City in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string City
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._City;
+                return _Id;
             }
             set
             {
-                this.OnCityChanging(value);
-                this.ReportPropertyChanging("City");
-                this._City = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("City");
-                this.OnCityChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private string _City;
-        partial void OnCityChanging(string value);
-        partial void OnCityChanged();
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
+        partial void OnIdChanged();
+
+        #endregion
+    
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="DataTypeTest")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class DataTypeTest : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new DataTypeTest object.
+        /// </summary>
+        /// <param name="id">Initial value of the id property.</param>
+        /// <param name="id2">Initial value of the id2 property.</param>
+        public static DataTypeTest CreateDataTypeTest(global::System.Guid id, global::System.Guid id2)
+        {
+            DataTypeTest dataTypeTest = new DataTypeTest();
+            dataTypeTest.id = id;
+            dataTypeTest.id2 = id2;
+            return dataTypeTest;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Guid id
+        {
+            get
+            {
+                return _id;
+            }
+            set
+            {
+                if (_id != value)
+                {
+                    OnidChanging(value);
+                    ReportPropertyChanging("id");
+                    _id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("id");
+                    OnidChanged();
+                }
+            }
+        }
+        private global::System.Guid _id;
+        partial void OnidChanging(global::System.Guid value);
+        partial void OnidChanged();
+    
         /// <summary>
-        /// There are no comments for Property State in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string State
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Guid id2
         {
             get
             {
-                return this._State;
+                return _id2;
             }
             set
             {
-                this.OnStateChanging(value);
-                this.ReportPropertyChanging("State");
-                this._State = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("State");
-                this.OnStateChanged();
+                Onid2Changing(value);
+                ReportPropertyChanging("id2");
+                _id2 = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("id2");
+                Onid2Changed();
             }
         }
-        private string _State;
-        partial void OnStateChanging(string value);
-        partial void OnStateChanged();
+        private global::System.Guid _id2;
+        partial void Onid2Changing(global::System.Guid value);
+        partial void Onid2Changed();
+    
         /// <summary>
-        /// There are no comments for Property ZipCode in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string ZipCode
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String idAsChar
         {
             get
             {
-                return this._ZipCode;
+                return _idAsChar;
             }
             set
             {
-                this.OnZipCodeChanging(value);
-                this.ReportPropertyChanging("ZipCode");
-                this._ZipCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("ZipCode");
-                this.OnZipCodeChanged();
+                OnidAsCharChanging(value);
+                ReportPropertyChanging("idAsChar");
+                _idAsChar = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("idAsChar");
+                OnidAsCharChanged();
             }
         }
-        private string _ZipCode;
-        partial void OnZipCodeChanging(string value);
-        partial void OnZipCodeChanged();
+        private global::System.String _idAsChar;
+        partial void OnidAsCharChanging(global::System.String value);
+        partial void OnidAsCharChanged();
+
+        #endregion
+    
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Store in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Store")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Store : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="DesktopComputer")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class DesktopComputer : Computer
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Store object.
+        /// Create a new DesktopComputer object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="name">Initial value of Name.</param>
-        public static Store CreateStore(int id, string name)
+        /// <param name="brand">Initial value of the Brand property.</param>
+        /// <param name="id">Initial value of the Id property.</param>
+        public static DesktopComputer CreateDesktopComputer(global::System.String brand, global::System.Int32 id)
         {
-            Store store = new Store();
-            store.Id = id;
-            store.Name = name;
-            return store;
+            DesktopComputer desktopComputer = new DesktopComputer();
+            desktopComputer.Brand = brand;
+            desktopComputer.Id = id;
+            return desktopComputer;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String Color
         {
             get
             {
-                return this._Id;
+                return _Color;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                OnColorChanging(value);
+                ReportPropertyChanging("Color");
+                _Color = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("Color");
+                OnColorChanged();
+            }
+        }
+        private global::System.String _Color;
+        partial void OnColorChanging(global::System.String value);
+        partial void OnColorChanged();
+
+        #endregion
+    
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Employee")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    [KnownTypeAttribute(typeof(SalariedEmployee))]
+    public partial class Employee : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new Employee object.
+        /// </summary>
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="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 id, global::System.String lastName, global::System.String firstName)
+        {
+            Employee employee = new Employee();
+            employee.Id = id;
+            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 Id
+        {
+            get
+            {
+                return _Id;
+            }
+            set
+            {
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String LastName
         {
             get
             {
-                return this._Name;
+                return _LastName;
             }
             set
             {
-                this.OnNameChanging(value);
-                this.ReportPropertyChanging("Name");
-                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Name");
-                this.OnNameChanged();
+                OnLastNameChanging(value);
+                ReportPropertyChanging("LastName");
+                _LastName = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("LastName");
+                OnLastNameChanged();
             }
         }
-        private string _Name;
-        partial void OnNameChanging(string value);
-        partial void OnNameChanged();
+        private global::System.String _LastName;
+        partial void OnLastNameChanging(global::System.String value);
+        partial void OnLastNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property Address in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Address
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String FirstName
         {
             get
             {
-                return this._Address;
+                return _FirstName;
             }
             set
             {
-                this.OnAddressChanging(value);
-                this.ReportPropertyChanging("Address");
-                this._Address = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("Address");
-                this.OnAddressChanged();
+                OnFirstNameChanging(value);
+                ReportPropertyChanging("FirstName");
+                _FirstName = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("FirstName");
+                OnFirstNameChanged();
             }
         }
-        private string _Address;
-        partial void OnAddressChanging(string value);
-        partial void OnAddressChanged();
+        private global::System.String _FirstName;
+        partial void OnFirstNameChanging(global::System.String value);
+        partial void OnFirstNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property City in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string City
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Int32> Age
         {
             get
             {
-                return this._City;
+                return _Age;
             }
             set
             {
-                this.OnCityChanging(value);
-                this.ReportPropertyChanging("City");
-                this._City = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("City");
-                this.OnCityChanged();
+                OnAgeChanging(value);
+                ReportPropertyChanging("Age");
+                _Age = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("Age");
+                OnAgeChanged();
             }
         }
-        private string _City;
-        partial void OnCityChanging(string value);
-        partial void OnCityChanged();
+        private Nullable<global::System.Int32> _Age;
+        partial void OnAgeChanging(Nullable<global::System.Int32> value);
+        partial void OnAgeChanged();
+
+        #endregion
+    
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="LaptopComputer")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class LaptopComputer : Computer
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new LaptopComputer object.
+        /// </summary>
+        /// <param name="brand">Initial value of the Brand property.</param>
+        /// <param name="id">Initial value of the Id property.</param>
+        public static LaptopComputer CreateLaptopComputer(global::System.String brand, global::System.Int32 id)
+        {
+            LaptopComputer laptopComputer = new LaptopComputer();
+            laptopComputer.Brand = brand;
+            laptopComputer.Id = id;
+            return laptopComputer;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property State in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string State
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Boolean> IsCertified
         {
             get
             {
-                return this._State;
+                return _IsCertified;
             }
             set
             {
-                this.OnStateChanging(value);
-                this.ReportPropertyChanging("State");
-                this._State = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("State");
-                this.OnStateChanged();
+                OnIsCertifiedChanging(value);
+                ReportPropertyChanging("IsCertified");
+                _IsCertified = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("IsCertified");
+                OnIsCertifiedChanged();
             }
         }
-        private string _State;
-        partial void OnStateChanging(string value);
-        partial void OnStateChanged();
+        private Nullable<global::System.Boolean> _IsCertified;
+        partial void OnIsCertifiedChanging(Nullable<global::System.Boolean> value);
+        partial void OnIsCertifiedChanged();
+    
         /// <summary>
-        /// There are no comments for Property ZipCode in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string ZipCode
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String Size
         {
             get
             {
-                return this._ZipCode;
+                return _Size;
             }
             set
             {
-                this.OnZipCodeChanging(value);
-                this.ReportPropertyChanging("ZipCode");
-                this._ZipCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("ZipCode");
-                this.OnZipCodeChanged();
+                OnSizeChanging(value);
+                ReportPropertyChanging("Size");
+                _Size = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("Size");
+                OnSizeChanged();
             }
         }
-        private string _ZipCode;
-        partial void OnZipCodeChanging(string value);
-        partial void OnZipCodeChanged();
+        private global::System.String _Size;
+        partial void OnSizeChanging(global::System.String value);
+        partial void OnSizeChanged();
+
+        #endregion
+    
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Order in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Order")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Order : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Order")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Order : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
         /// Create a new Order object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="freight">Initial value of Freight.</param>
-        public static Order CreateOrder(int id, double freight)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="freight">Initial value of the Freight property.</param>
+        public static Order CreateOrder(global::System.Int32 id, global::System.Double freight)
         {
             Order order = new Order();
             order.Id = id;
             order.Freight = freight;
             return order;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Freight in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public double Freight
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Double Freight
         {
             get
             {
-                return this._Freight;
+                return _Freight;
             }
             set
             {
-                this.OnFreightChanging(value);
-                this.ReportPropertyChanging("Freight");
-                this._Freight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Freight");
-                this.OnFreightChanged();
+                OnFreightChanging(value);
+                ReportPropertyChanging("Freight");
+                _Freight = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("Freight");
+                OnFreightChanged();
             }
         }
-        private double _Freight;
-        partial void OnFreightChanging(double value);
+        private global::System.Double _Freight;
+        partial void OnFreightChanging(global::System.Double value);
         partial void OnFreightChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
         /// <summary>
-        /// There are no comments for Store in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Orders_Store", "Store")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Orders_Store", "Store")]
         public Store Store
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store").Value;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store").Value;
             }
             set
             {
-                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store").Value = value;
+                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store").Value = value;
             }
         }
         /// <summary>
-        /// There are no comments for Store in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.ComponentModel.BrowsableAttribute(false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityReference<Store> StoreReference
+        [BrowsableAttribute(false)]
+        [DataMemberAttribute()]
+        public EntityReference<Store> StoreReference
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store");
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store");
             }
             set
             {
                 if ((value != null))
                 {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Store>("testModel.FK_Orders_Store", "Store", value);
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Store>("testModel.FK_Orders_Store", "Store", value);
                 }
             }
         }
+
+        #endregion
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Book in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Book")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Book : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Product")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Product : EntityObject
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Book object.
+        /// Create a new Product object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="name">Initial value of Name.</param>
-        /// <param name="pages">Initial value of Pages.</param>
-        public static Book CreateBook(int id, string name, int pages)
-        {
-            Book book = new Book();
-            book.Id = id;
-            book.Name = name;
-            book.Pages = pages;
-            return book;
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        /// <param name="createdDate">Initial value of the CreatedDate property.</param>
+        public static Product CreateProduct(global::System.Int32 id, global::System.String name, global::System.DateTime createdDate)
+        {
+            Product product = new Product();
+            product.Id = id;
+            product.Name = name;
+            product.CreatedDate = createdDate;
+            return product;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Id;
+                return _Id;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
         partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._Name;
+                return _Name;
             }
             set
             {
-                this.OnNameChanging(value);
-                this.ReportPropertyChanging("Name");
-                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Name");
-                this.OnNameChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private string _Name;
-        partial void OnNameChanging(string value);
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
         partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property Pages in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Pages
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.DateTime CreatedDate
         {
             get
             {
-                return this._Pages;
+                return _CreatedDate;
             }
             set
             {
-                this.OnPagesChanging(value);
-                this.ReportPropertyChanging("Pages");
-                this._Pages = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Pages");
-                this.OnPagesChanged();
+                OnCreatedDateChanging(value);
+                ReportPropertyChanging("CreatedDate");
+                _CreatedDate = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("CreatedDate");
+                OnCreatedDateChanged();
             }
         }
-        private int _Pages;
-        partial void OnPagesChanging(int value);
-        partial void OnPagesChanged();
+        private global::System.DateTime _CreatedDate;
+        partial void OnCreatedDateChanging(global::System.DateTime value);
+        partial void OnCreatedDateChanged();
+
+        #endregion
+    
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Publisher")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Publisher : EntityObject
+    {
+        #region Factory Method
+    
         /// <summary>
-        /// There are no comments for Author in the schema.
+        /// Create a new Publisher object.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Authors", "Authors")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public Author Author
+        /// <param name="id">Initial value of the id property.</param>
+        /// <param name="name">Initial value of the name property.</param>
+        public static Publisher CreatePublisher(global::System.Int32 id, global::System.String name)
         {
-            get
-            {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors").Value;
-            }
-            set
-            {
-                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors").Value = value;
-            }
+            Publisher publisher = new Publisher();
+            publisher.id = id;
+            publisher.name = name;
+            return publisher;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Author in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.ComponentModel.BrowsableAttribute(false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityReference<Author> AuthorReference
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 id
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors");
+                return _id;
             }
             set
             {
-                if ((value != null))
+                if (_id != value)
                 {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Author>("testModel.FK_Books_Authors", "Authors", value);
+                    OnidChanging(value);
+                    ReportPropertyChanging("id");
+                    _id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("id");
+                    OnidChanged();
                 }
             }
         }
+        private global::System.Int32 _id;
+        partial void OnidChanging(global::System.Int32 value);
+        partial void OnidChanged();
+    
         /// <summary>
-        /// There are no comments for Publisher in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Publishers", "Publishers")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public Publisher Publisher
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String name
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers").Value;
+                return _name;
             }
             set
             {
-                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers").Value = value;
+                OnnameChanging(value);
+                ReportPropertyChanging("name");
+                _name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("name");
+                OnnameChanged();
             }
         }
+        private global::System.String _name;
+        partial void OnnameChanging(global::System.String value);
+        partial void OnnameChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
         /// <summary>
-        /// There are no comments for Publisher in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.ComponentModel.BrowsableAttribute(false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityReference<Publisher> PublisherReference
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Publishers", "Books")]
+        public EntityCollection<Book> Books
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers");
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Book>("testModel.FK_Books_Publishers", "Books");
             }
             set
             {
                 if ((value != null))
                 {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers", value);
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Book>("testModel.FK_Books_Publishers", "Books", value);
                 }
             }
         }
+
+        #endregion
     }
+    
     /// <summary>
-    /// There are no comments for testModel.Author in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Author")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Author : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="SalariedEmployee")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class SalariedEmployee : Employee
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new Author object.
+        /// Create a new SalariedEmployee object.
         /// </summary>
-        /// <param name="id">Initial value of Id.</param>
-        /// <param name="name">Initial value of Name.</param>
-        public static Author CreateAuthor(int id, string name)
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="lastName">Initial value of the LastName property.</param>
+        /// <param name="firstName">Initial value of the FirstName property.</param>
+        /// <param name="salary">Initial value of the Salary property.</param>
+        public static SalariedEmployee CreateSalariedEmployee(global::System.Int32 id, global::System.String lastName, global::System.String firstName, global::System.Int32 salary)
         {
-            Author author = new Author();
-            author.Id = id;
-            author.Name = name;
-            return author;
+            SalariedEmployee salariedEmployee = new SalariedEmployee();
+            salariedEmployee.Id = id;
+            salariedEmployee.LastName = lastName;
+            salariedEmployee.FirstName = firstName;
+            salariedEmployee.Salary = salary;
+            return salariedEmployee;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Salary
         {
             get
             {
-                return this._Id;
+                return _Salary;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                OnSalaryChanging(value);
+                ReportPropertyChanging("Salary");
+                _Salary = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("Salary");
+                OnSalaryChanged();
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
-        partial void OnIdChanged();
+        private global::System.Int32 _Salary;
+        partial void OnSalaryChanging(global::System.Int32 value);
+        partial void OnSalaryChanged();
+
+        #endregion
+    
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Store")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Store : EntityObject
+    {
+        #region Factory Method
+    
+        /// <summary>
+        /// Create a new Store object.
+        /// </summary>
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        public static Store CreateStore(global::System.Int32 id, global::System.String name)
+        {
+            Store store = new Store();
+            store.Id = id;
+            store.Name = name;
+            return store;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property Name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._Name;
+                return _Id;
             }
             set
             {
-                this.OnNameChanging(value);
-                this.ReportPropertyChanging("Name");
-                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Name");
-                this.OnNameChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private string _Name;
-        partial void OnNameChanging(string value);
-        partial void OnNameChanged();
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
+        partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Age in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<int> Age
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._Age;
+                return _Name;
             }
             set
             {
-                this.OnAgeChanging(value);
-                this.ReportPropertyChanging("Age");
-                this._Age = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Age");
-                this.OnAgeChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private global::System.Nullable<int> _Age;
-        partial void OnAgeChanging(global::System.Nullable<int> value);
-        partial void OnAgeChanged();
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
+        partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Books in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Authors", "Books")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityCollection<Book> Books
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String Address
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Book>("testModel.FK_Books_Authors", "Books");
+                return _Address;
             }
             set
             {
-                if ((value != null))
-                {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Book>("testModel.FK_Books_Authors", "Books", value);
-                }
+                OnAddressChanging(value);
+                ReportPropertyChanging("Address");
+                _Address = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("Address");
+                OnAddressChanged();
             }
         }
-    }
-    /// <summary>
-    /// There are no comments for testModel.Publisher in the schema.
-    /// </summary>
-    /// <KeyProperties>
-    /// id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Publisher")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class Publisher : global::System.Data.Objects.DataClasses.EntityObject
-    {
-        /// <summary>
-        /// Create a new Publisher object.
-        /// </summary>
-        /// <param name="id">Initial value of id.</param>
-        /// <param name="name">Initial value of name.</param>
-        public static Publisher CreatePublisher(int id, string name)
-        {
-            Publisher publisher = new Publisher();
-            publisher.id = id;
-            publisher.name = name;
-            return publisher;
-        }
+        private global::System.String _Address;
+        partial void OnAddressChanging(global::System.String value);
+        partial void OnAddressChanged();
+    
         /// <summary>
-        /// There are no comments for Property id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String City
         {
             get
             {
-                return this._id;
+                return _City;
             }
             set
             {
-                this.OnidChanging(value);
-                this.ReportPropertyChanging("id");
-                this._id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("id");
-                this.OnidChanged();
+                OnCityChanging(value);
+                ReportPropertyChanging("City");
+                _City = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("City");
+                OnCityChanged();
             }
         }
-        private int _id;
-        partial void OnidChanging(int value);
-        partial void OnidChanged();
+        private global::System.String _City;
+        partial void OnCityChanging(global::System.String value);
+        partial void OnCityChanged();
+    
         /// <summary>
-        /// There are no comments for Property name in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string name
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String State
         {
             get
             {
-                return this._name;
+                return _State;
             }
             set
             {
-                this.OnnameChanging(value);
-                this.ReportPropertyChanging("name");
-                this._name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("name");
-                this.OnnameChanged();
+                OnStateChanging(value);
+                ReportPropertyChanging("State");
+                _State = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("State");
+                OnStateChanged();
             }
         }
-        private string _name;
-        partial void OnnameChanging(string value);
-        partial void OnnameChanged();
+        private global::System.String _State;
+        partial void OnStateChanging(global::System.String value);
+        partial void OnStateChanged();
+    
         /// <summary>
-        /// There are no comments for Books in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Publishers", "Books")]
-        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
-        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Data.Objects.DataClasses.EntityCollection<Book> Books
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String ZipCode
         {
             get
             {
-                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Book>("testModel.FK_Books_Publishers", "Books");
+                return _ZipCode;
             }
             set
             {
-                if ((value != null))
-                {
-                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Book>("testModel.FK_Books_Publishers", "Books", value);
-                }
+                OnZipCodeChanging(value);
+                ReportPropertyChanging("ZipCode");
+                _ZipCode = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("ZipCode");
+                OnZipCodeChanged();
             }
         }
+        private global::System.String _ZipCode;
+        partial void OnZipCodeChanging(global::System.String value);
+        partial void OnZipCodeChanged();
+
+        #endregion
+    
     }
+    
     /// <summary>
-    /// There are no comments for testModel.DataTypeTest in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="DataTypeTest")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class DataTypeTest : global::System.Data.Objects.DataClasses.EntityObject
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="TabletComputer")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class TabletComputer : Computer
     {
+        #region Factory Method
+    
         /// <summary>
-        /// Create a new DataTypeTest object.
+        /// Create a new TabletComputer object.
         /// </summary>
-        /// <param name="id">Initial value of id.</param>
-        /// <param name="id2">Initial value of id2.</param>
-        public static DataTypeTest CreateDataTypeTest(global::System.Guid id, global::System.Guid id2)
+        /// <param name="brand">Initial value of the Brand property.</param>
+        /// <param name="id">Initial value of the Id property.</param>
+        public static TabletComputer CreateTabletComputer(global::System.String brand, global::System.Int32 id)
         {
-            DataTypeTest dataTypeTest = new DataTypeTest();
-            dataTypeTest.id = id;
-            dataTypeTest.id2 = id2;
-            return dataTypeTest;
+            TabletComputer tabletComputer = new TabletComputer();
+            tabletComputer.Brand = brand;
+            tabletComputer.Id = id;
+            return tabletComputer;
         }
+
+        #endregion
+        #region Primitive Properties
+    
         /// <summary>
-        /// There are no comments for Property id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Guid id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.Boolean> IsAvailable
         {
             get
             {
-                return this._id;
+                return _IsAvailable;
             }
             set
             {
-                this.OnidChanging(value);
-                this.ReportPropertyChanging("id");
-                this._id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("id");
-                this.OnidChanged();
+                OnIsAvailableChanging(value);
+                ReportPropertyChanging("IsAvailable");
+                _IsAvailable = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("IsAvailable");
+                OnIsAvailableChanged();
             }
         }
-        private global::System.Guid _id;
-        partial void OnidChanging(global::System.Guid value);
-        partial void OnidChanged();
+        private Nullable<global::System.Boolean> _IsAvailable;
+        partial void OnIsAvailableChanging(Nullable<global::System.Boolean> value);
+        partial void OnIsAvailableChanged();
+    
         /// <summary>
-        /// There are no comments for Property id2 in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Guid id2
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public Nullable<global::System.DateTime> ReleaseDate
         {
             get
             {
-                return this._id2;
+                return _ReleaseDate;
             }
             set
             {
-                this.Onid2Changing(value);
-                this.ReportPropertyChanging("id2");
-                this._id2 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("id2");
-                this.Onid2Changed();
+                OnReleaseDateChanging(value);
+                ReportPropertyChanging("ReleaseDate");
+                _ReleaseDate = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("ReleaseDate");
+                OnReleaseDateChanged();
             }
         }
-        private global::System.Guid _id2;
-        partial void Onid2Changing(global::System.Guid value);
-        partial void Onid2Changed();
+        private Nullable<global::System.DateTime> _ReleaseDate;
+        partial void OnReleaseDateChanging(Nullable<global::System.DateTime> value);
+        partial void OnReleaseDateChanged();

+
+        #endregion
+    
+    }
+    
+    /// <summary>
+    /// No Metadata Documentation available.
+    /// </summary>
+    [EdmEntityTypeAttribute(NamespaceName="testModel", Name="Toy")]
+    [Serializable()]
+    [DataContractAttribute(IsReference=true)]
+    public partial class Toy : EntityObject
+    {
+        #region Factory Method
+    
         /// <summary>
-        /// There are no comments for Property idAsChar in the schema.
+        /// Create a new Toy object.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string idAsChar
+        /// <param name="id">Initial value of the Id property.</param>
+        /// <param name="name">Initial value of the Name property.</param>
+        /// <param name="minAge">Initial value of the MinAge property.</param>
+        public static Toy CreateToy(global::System.Int32 id, global::System.String name, global::System.Int32 minAge)
+        {
+            Toy toy = new Toy();
+            toy.Id = id;
+            toy.Name = name;
+            toy.MinAge = minAge;
+            return toy;
+        }
+
+        #endregion
+        #region Primitive Properties
+    
+        /// <summary>
+        /// No Metadata Documentation available.
+        /// </summary>
+        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 Id
         {
             get
             {
-                return this._idAsChar;
+                return _Id;
             }
             set
             {
-                this.OnidAsCharChanging(value);
-                this.ReportPropertyChanging("idAsChar");
-                this._idAsChar = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("idAsChar");
-                this.OnidAsCharChanged();
+                if (_Id != value)
+                {
+                    OnIdChanging(value);
+                    ReportPropertyChanging("Id");
+                    _Id = StructuralObject.SetValidValue(value);
+                    ReportPropertyChanged("Id");
+                    OnIdChanged();
+                }
             }
         }
-        private string _idAsChar;
-        partial void OnidAsCharChanging(string value);
-        partial void OnidAsCharChanged();
-    }
-    /// <summary>
-    /// There are no comments for testModel.Computer in the schema.
-    /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Computer")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.DesktopComputer))]
-    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.LaptopComputer))]
-    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.TabletComputer))]
-    public abstract partial class Computer : global::System.Data.Objects.DataClasses.EntityObject
-    {
+        private global::System.Int32 _Id;
+        partial void OnIdChanging(global::System.Int32 value);
+        partial void OnIdChanged();
+    
         /// <summary>
-        /// There are no comments for Property Brand in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Brand
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.String Name
         {
             get
             {
-                return this._Brand;
+                return _Name;
             }
             set
             {
-                this.OnBrandChanging(value);
-                this.ReportPropertyChanging("Brand");
-                this._Brand = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
-                this.ReportPropertyChanged("Brand");
-                this.OnBrandChanged();
+                OnNameChanging(value);
+                ReportPropertyChanging("Name");
+                _Name = StructuralObject.SetValidValue(value, false);
+                ReportPropertyChanged("Name");
+                OnNameChanged();
             }
         }
-        private string _Brand;
-        partial void OnBrandChanging(string value);
-        partial void OnBrandChanged();
+        private global::System.String _Name;
+        partial void OnNameChanging(global::System.String value);
+        partial void OnNameChanged();
+    
         /// <summary>
-        /// There are no comments for Property Id in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public int Id
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+        [DataMemberAttribute()]
+        public global::System.Int32 MinAge
         {
             get
             {
-                return this._Id;
+                return _MinAge;
             }
             set
             {
-                this.OnIdChanging(value);
-                this.ReportPropertyChanging("Id");
-                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("Id");
-                this.OnIdChanged();
+                OnMinAgeChanging(value);
+                ReportPropertyChanging("MinAge");
+                _MinAge = StructuralObject.SetValidValue(value);
+                ReportPropertyChanged("MinAge");
+                OnMinAgeChanged();
             }
         }
-        private int _Id;
-        partial void OnIdChanging(int value);
-        partial void OnIdChanged();
-    }
-    /// <summary>
-    /// There are no comments for testModel.DesktopComputer in the schema.
-    /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="DesktopComputer")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class DesktopComputer : Computer
-    {
+        private global::System.Int32 _MinAge;
+        partial void OnMinAgeChanging(global::System.Int32 value);
+        partial void OnMinAgeChanged();
+
+        #endregion
+    
+        #region Navigation Properties
+    
         /// <summary>
-        /// Create a new DesktopComputer object.
+        /// No Metadata Documentation available.
         /// </summary>
-        /// <param name="brand">Initial value of Brand.</param>
-        /// <param name="id">Initial value of Id.</param>
-        public static DesktopComputer CreateDesktopComputer(string brand, int id)
+        [XmlIgnoreAttribute()]
+        [SoapIgnoreAttribute()]
+        [DataMemberAttribute()]
+        [EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Toys_Supplier", "Supplier")]
+        public Company Supplier
         {
-            DesktopComputer desktopComputer = new DesktopComputer();
-            desktopComputer.Brand = brand;
-            desktopComputer.Id = id;
-            return desktopComputer;
+            get
+            {
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier").Value;
+            }
+            set
+            {
+                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier").Value = value;
+            }
         }
         /// <summary>
-        /// There are no comments for Property Color in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Color
+        [BrowsableAttribute(false)]
+        [DataMemberAttribute()]
+        public EntityReference<Company> SupplierReference
         {
             get
             {
-                return this._Color;
+                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier");
             }
             set
             {
-                this.OnColorChanging(value);
-                this.ReportPropertyChanging("Color");
-                this._Color = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("Color");
-                this.OnColorChanged();
+                if ((value != null))
+                {
+                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier", value);
+                }
             }
         }
-        private string _Color;
-        partial void OnColorChanging(string value);
-        partial void OnColorChanged();
+
+        #endregion
     }
+
+    #endregion
+    #region ComplexTypes
+    
     /// <summary>
-    /// There are no comments for testModel.LaptopComputer in the schema.
+    /// No Metadata Documentation available.
     /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="LaptopComputer")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class LaptopComputer : Computer
+    [EdmComplexTypeAttribute(NamespaceName="testModel", Name="CommonAddress")]
+    [DataContractAttribute(IsReference=true)]
+    [Serializable()]
+    public partial class CommonAddress : ComplexObject
     {
+        #region Primitive Properties
+    
         /// <summary>
-        /// Create a new LaptopComputer object.
-        /// </summary>
-        /// <param name="brand">Initial value of Brand.</param>
-        /// <param name="id">Initial value of Id.</param>
-        public static LaptopComputer CreateLaptopComputer(string brand, int id)
-        {
-            LaptopComputer laptopComputer = new LaptopComputer();
-            laptopComputer.Brand = brand;
-            laptopComputer.Id = id;
-            return laptopComputer;
-        }
-        /// <summary>
-        /// There are no comments for Property IsCertified in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<bool> IsCertified
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String Address
         {
             get
             {
-                return this._IsCertified;
+                return _Address;
             }
             set
             {
-                this.OnIsCertifiedChanging(value);
-                this.ReportPropertyChanging("IsCertified");
-                this._IsCertified = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("IsCertified");
-                this.OnIsCertifiedChanged();
+                OnAddressChanging(value);
+                ReportPropertyChanging("Address");
+                _Address = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("Address");
+                OnAddressChanged();
             }
         }
-        private global::System.Nullable<bool> _IsCertified;
-        partial void OnIsCertifiedChanging(global::System.Nullable<bool> value);
-        partial void OnIsCertifiedChanged();
+        private global::System.String _Address;
+        partial void OnAddressChanging(global::System.String value);
+        partial void OnAddressChanged();
+    
         /// <summary>
-        /// There are no comments for Property Size in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public string Size
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String City
         {
             get
             {
-                return this._Size;
+                return _City;
             }
             set
             {
-                this.OnSizeChanging(value);
-                this.ReportPropertyChanging("Size");
-                this._Size = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
-                this.ReportPropertyChanged("Size");
-                this.OnSizeChanged();
+                OnCityChanging(value);
+                ReportPropertyChanging("City");
+                _City = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("City");
+                OnCityChanged();
             }
         }
-        private string _Size;
-        partial void OnSizeChanging(string value);
-        partial void OnSizeChanged();
-    }
-    /// <summary>
-    /// There are no comments for testModel.TabletComputer in the schema.
-    /// </summary>
-    /// <KeyProperties>
-    /// Id
-    /// </KeyProperties>
-    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="TabletComputer")]
-    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
-    [global::System.Serializable()]
-    public partial class TabletComputer : Computer
-    {
-        /// <summary>
-        /// Create a new TabletComputer object.
-        /// </summary>
-        /// <param name="brand">Initial value of Brand.</param>
-        /// <param name="id">Initial value of Id.</param>
-        public static TabletComputer CreateTabletComputer(string brand, int id)
-        {
-            TabletComputer tabletComputer = new TabletComputer();
-            tabletComputer.Brand = brand;
-            tabletComputer.Id = id;
-            return tabletComputer;
-        }
+        private global::System.String _City;
+        partial void OnCityChanging(global::System.String value);
+        partial void OnCityChanged();
+    
         /// <summary>
-        /// There are no comments for Property IsAvailable in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<bool> IsAvailable
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String State
         {
             get
             {
-                return this._IsAvailable;
+                return _State;
             }
             set
             {
-                this.OnIsAvailableChanging(value);
-                this.ReportPropertyChanging("IsAvailable");
-                this._IsAvailable = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("IsAvailable");
-                this.OnIsAvailableChanged();
+                OnStateChanging(value);
+                ReportPropertyChanging("State");
+                _State = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("State");
+                OnStateChanged();
             }
         }
-        private global::System.Nullable<bool> _IsAvailable;
-        partial void OnIsAvailableChanging(global::System.Nullable<bool> value);
-        partial void OnIsAvailableChanged();
+        private global::System.String _State;
+        partial void OnStateChanging(global::System.String value);
+        partial void OnStateChanged();
+    
         /// <summary>
-        /// There are no comments for Property ReleaseDate in the schema.
+        /// No Metadata Documentation available.
         /// </summary>
-        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
-        [global::System.Runtime.Serialization.DataMemberAttribute()]
-        public global::System.Nullable<global::System.DateTime> ReleaseDate
+        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
+        [DataMemberAttribute()]
+        public global::System.String ZipCode
         {
             get
             {
-                return this._ReleaseDate;
+                return _ZipCode;
             }
             set
             {
-                this.OnReleaseDateChanging(value);
-                this.ReportPropertyChanging("ReleaseDate");
-                this._ReleaseDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
-                this.ReportPropertyChanged("ReleaseDate");
-                this.OnReleaseDateChanged();
+                OnZipCodeChanging(value);
+                ReportPropertyChanging("ZipCode");
+                _ZipCode = StructuralObject.SetValidValue(value, true);
+                ReportPropertyChanged("ZipCode");
+                OnZipCodeChanged();
             }
         }
-        private global::System.Nullable<global::System.DateTime> _ReleaseDate;
-        partial void OnReleaseDateChanging(global::System.Nullable<global::System.DateTime> value);
-        partial void OnReleaseDateChanged();
+        private global::System.String _ZipCode;
+        partial void OnZipCodeChanging(global::System.String value);
+        partial void OnZipCodeChanged();
+
+        #endregion
     }
+
+    #endregion
+    
 }

=== modified file 'Tests/MySql.Data.Entity.Tests/TestModel.edmx'
--- a/Tests/MySql.Data.Entity.Tests/TestModel.edmx	2011-06-02 18:02:31 +0000
+++ b/Tests/MySql.Data.Entity.Tests/TestModel.edmx	2011-06-23 13:59:14 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
+<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
     <!-- EF Runtime content -->
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl" Namespace="testModel.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5">
+      <Schema xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl" Namespace="testModel.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5"  xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator">
         <EntityContainer Name="testContainer" >
           <EntitySet Name="Employees" EntityType="testModel.Store.Employees" />
           <EntitySet Name="EmployeeChildren" EntityType="testModel.Store.EmployeeChildren" />
@@ -49,6 +49,7 @@ <?xml version="1.0" encoding="utf-8"?
             <End Role="Computers" EntitySet="Computers" />
             <End Role="TabletComputers" EntitySet="TabletComputers" />
           </AssociationSet>
+          <EntitySet Name="Products" EntityType="testModel.Store.Products" />
         </EntityContainer>
 
         <EntityType Name="Employees">
@@ -264,6 +265,14 @@ <?xml version="1.0" encoding="utf-8"?
           <Property Name="IsAvailable" Type="bit" />
           <Property Name="ReleaseDate" Type="datetime" />
         </EntityType>
+        <EntityType Name="Products">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
+          <Property Name="Name" Type="varchar" Nullable="false" MaxLength="45" />
+          <Property Name="CreatedDate" Type="timestamp" Nullable="false" Precision="0" StoreGeneratedPattern="Computed" />
+        </EntityType>
         <Association Name="FK_DesktopComputer_Computer">
           <End Role="Computers" Type="testModel.Store.Computers" Multiplicity="1" />
           <End Role="DesktopComputers" Type="testModel.Store.DesktopComputers" Multiplicity="0..1" />
@@ -305,7 +314,7 @@ <?xml version="1.0" encoding="utf-8"?
     
     <!-- CSDL content -->
     <edmx:ConceptualModels>
-      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm" xmlns:cg="http://schemas.microsoft.com/ado/2006/04/codegeneration" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" Namespace="testModel" Alias="Self" >
+      <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="testModel" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation">
         <EntityContainer Name="testEntities" >
           <EntitySet Name="Employees" EntityType="testModel.Employee" />
           <EntitySet Name="Children" EntityType="testModel.Child" />
@@ -334,6 +343,7 @@ <?xml version="1.0" encoding="utf-8"?
           </AssociationSet>
           <EntitySet Name="DataTypeTests" EntityType="testModel.DataTypeTest"/>
           <EntitySet Name="Computers" EntityType="testModel.Computer" />
+          <EntitySet Name="Products" EntityType="testModel.Product" />
         </EntityContainer>
         
         <EntityType Name="Employee">
@@ -360,7 +370,7 @@ ïerty Name="FirstName" Type="String" Nullable="false" MaxLength="10" />
           <Property Name="BirthTime" Type="Time" Nullable="true"/>
           <Property Name="BirthWeight" Type="Double" Nullable="true"/>
-          <Property Name="Modified" Type="DateTimeOffset" Nullable ="false"/>
+          <Property Name="Modified" Type="DateTime" Nullable ="false"/>
         </EntityType>
 
         <EntityType Name="Company">
@@ -493,11 +503,20 @@ operty Name="IsAvailable" Type="Boolean" />
           <Property Name="ReleaseDate" Type="DateTime" />
         </EntityType>
+
+        <EntityType Name="Product">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Type="Int32" Name="Id" Nullable="false" />
+          <Property Type="String" Name="Name" Nullable="false" />
+          <Property Type="DateTime" Name="CreatedDate" Nullable="false" />
+        </EntityType>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
     <edmx:Mappings>
-      <Mapping xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS" Space="C-S">
+      <Mapping xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs" Space="C-S">
         <Alias Key="Model" Value="testModel" />
         <Alias Key="Target" Value="testModel.Store" />
         <EntityContainerMapping CdmEntityContainer="testEntities" StorageEntityContainer="testContainer">
@@ -715,13 +734,23 @@ <?xml version="1.0" encoding="utf-8"?
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+
+          <EntitySetMapping Name="Products">
+            <EntityTypeMapping TypeName="testModel.Product">
+              <MappingFragment StoreEntitySet="Products">
+                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Id" ColumnName="Id" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
           
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>
   </edmx:Runtime>
   <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
-  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2007/06/edmx">
+  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
     <edmx:Connection>
       <DesignerInfoPropertySet>
         <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />

=== modified file 'VS2008/Source/MySql.Data.Entity/MySql.Data.Entity.csproj'
--- a/VS2008/Source/MySql.Data.Entity/MySql.Data.Entity.csproj	2011-06-21 18:51:27 +0000
+++ b/VS2008/Source/MySql.Data.Entity/MySql.Data.Entity.csproj	2011-06-23 13:59:14 +0000
@@ -60,7 +60,9 @@ <?xml version="1.0" encoding="utf-8"?
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="..\..\..\Source\MySql.Data.Entity\Properties\SchemaMapping.msl" />
+    <EmbeddedResource Include="..\..\..\Source\MySql.Data.Entity\Properties\SchemaMapping.msl">
+      <Link>Properties\SchemaMapping.msl</Link>
+    </EmbeddedResource>
     <Compile Include="..\..\..\Source\MySql.Data\Properties\VersionInfo.cs">
       <Link>Properties\VersionInfo.cs</Link>
     </Compile>

=== added file 'VS2008/Tests/MySql.Data.Entity.Tests/Model1.Designer.cs'
--- a/VS2008/Tests/MySql.Data.Entity.Tests/Model1.Designer.cs	1970-01-01 00:00:00 +0000
+++ b/VS2008/Tests/MySql.Data.Entity.Tests/Model1.Designer.cs	2011-06-23 13:59:14 +0000
@@ -0,0 +1,233 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.5446
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
+
+// Original file name:
+// Generation date: 6/23/2011 7:22:59 AM
+namespace MySql.Data.Entity.Tests
+{
+    
+    /// <summary>
+    /// There are no comments for Model1Container in the schema.
+    /// </summary>
+    public partial class Model1Container : global::System.Data.Objects.ObjectContext
+    {
+        /// <summary>
+        /// Initializes a new Model1Container object using the connection string found in the 'Model1Container' section of the application configuration file.
+        /// </summary>
+        public Model1Container() : 
+                base("name=Model1Container", "Model1Container")
+        {
+            this.OnContextCreated();
+        }
+        /// <summary>
+        /// Initialize a new Model1Container object.
+        /// </summary>
+        public Model1Container(string connectionString) : 
+                base(connectionString, "Model1Container")
+        {
+            this.OnContextCreated();
+        }
+        /// <summary>
+        /// Initialize a new Model1Container object.
+        /// </summary>
+        public Model1Container(global::System.Data.EntityClient.EntityConnection connection) : 
+                base(connection, "Model1Container")
+        {
+            this.OnContextCreated();
+        }
+        partial void OnContextCreated();
+        /// <summary>
+        /// There are no comments for Animals in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Animal> Animals
+        {
+            get
+            {
+                if ((this._Animals == null))
+                {
+                    this._Animals = base.CreateQuery<Animal>("[Animals]");
+                }
+                return this._Animals;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Animal> _Animals;
+        /// <summary>
+        /// There are no comments for Shelters in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Shelter> Shelters
+        {
+            get
+            {
+                if ((this._Shelters == null))
+                {
+                    this._Shelters = base.CreateQuery<Shelter>("[Shelters]");
+                }
+                return this._Shelters;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Shelter> _Shelters;
+        /// <summary>
+        /// There are no comments for Animals in the schema.
+        /// </summary>
+        public void AddToAnimals(Animal animal)
+        {
+            base.AddObject("Animals", animal);
+        }
+        /// <summary>
+        /// There are no comments for Shelters in the schema.
+        /// </summary>
+        public void AddToShelters(Shelter shelter)
+        {
+            base.AddObject("Shelters", shelter);
+        }
+    }
+    /// <summary>
+    /// There are no comments for Model1.Animal in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="Model1", Name="Animal")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Animal : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Animal object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        /// <param name="shelterId">Initial value of ShelterId.</param>
+        public static Animal CreateAnimal(int id, string name, int shelterId)
+        {
+            Animal animal = new Animal();
+            animal.Id = id;
+            animal.Name = name;
+            animal.ShelterId = shelterId;
+            return animal;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property ShelterId in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int ShelterId
+        {
+            get
+            {
+                return this._ShelterId;
+            }
+            set
+            {
+                this.OnShelterIdChanging(value);
+                this.ReportPropertyChanging("ShelterId");
+                this._ShelterId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("ShelterId");
+                this.OnShelterIdChanged();
+            }
+        }
+        private int _ShelterId;
+        partial void OnShelterIdChanging(int value);
+        partial void OnShelterIdChanged();
+    }
+    /// <summary>
+    /// There are no comments for Model1.Shelter in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="Model1", Name="Shelter")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Shelter : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Shelter object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        public static Shelter CreateShelter(int id)
+        {
+            Shelter shelter = new Shelter();
+            shelter.Id = id;
+            return shelter;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+    }
+}

=== added file 'VS2008/Tests/MySql.Data.Entity.Tests/Model1.edmx'
--- a/VS2008/Tests/MySql.Data.Entity.Tests/Model1.edmx	1970-01-01 00:00:00 +0000
+++ b/VS2008/Tests/MySql.Data.Entity.Tests/Model1.edmx	2011-06-23 13:59:14 +0000
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
+  <!-- EF Runtime content -->
+  <edmx:Runtime>
+    <!-- SSDL content -->
+    <edmx:StorageModels>
+      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl" Namespace="Model1.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5">
+        <EntityContainer Name="Model1TargetContainer" >
+          <EntitySet Name="Animals" EntityType="Model1.Store.TheAnimals" />
+          <EntitySet Name="Facilities" EntityType="Model1.Store.Facility" />
+        </EntityContainer>
+        <EntityType Name="TheAnimals">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false"/>
+          <Property Name="Name" Type="varchar" MaxLength="20" Nullable="false"/>
+          <Property Name="ShelterId" Type="int" Nullable="false"/>
+        </EntityType>
+        <EntityType Name="Facility">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false"/>
+        </EntityType>
+      </Schema>
+    </edmx:StorageModels>
+    <!-- CSDL content -->
+    <edmx:ConceptualModels>
+      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm" xmlns:cg="http://schemas.microsoft.com/ado/2006/04/codegeneration" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" Namespace="Model1" Alias="Self">
+        <EntityContainer Name="Model1Container" >
+          <EntitySet Name="Animals" EntityType="Model1.Animal" />
+          <EntitySet Name="Shelters" EntityType="Model1.Shelter" />
+        </EntityContainer>
+        <EntityType Name="Animal">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Type="Int32" Name="Id" Nullable="false" />
+          <Property Type="String" Name="Name" Nullable="false" />
+          <Property Type="Int32" Name="ShelterId" Nullable="false" />
+        </EntityType>
+        <EntityType Name="Shelter">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Type="Int32" Name="Id" Nullable="false" />
+        </EntityType>
+      </Schema>
+    </edmx:ConceptualModels>
+    <!-- C-S mapping content -->
+    <edmx:Mappings>
+      <Mapping xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS" Space="C-S">
+        <Alias Key="Model" Value="Model1" />
+        <Alias Key="Target" Value="Model1.Store" />
+        <EntityContainerMapping CdmEntityContainer="Model1Container" StorageEntityContainer="Model1TargetContainer">
+          <EntitySetMapping Name="Animals">
+            <EntityTypeMapping TypeName="Model1.Animal">
+              <MappingFragment StoreEntitySet="Animals">
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="Name" ColumnName="Name"/>
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+        </EntityContainerMapping>
+      </Mapping>
+    </edmx:Mappings>
+  </edmx:Runtime>
+  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2007/06/edmx">
+    <edmx:Connection>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+      </DesignerInfoPropertySet>
+    </edmx:Connection>
+    <edmx:Options>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="ValidateOnBuild" Value="true" />
+        <DesignerProperty Name="EnablePluralization" Value="True" />
+      </DesignerInfoPropertySet>
+    </edmx:Options>
+    <!-- Diagram content (shape and connector positions) -->
+    <edmx:Diagrams>
+      <Diagram Name="Model1" >
+        <EntityTypeShape EntityType="Model1.Animal" Width="1.5" PointX="2.375" PointY="1.125" Height="1.4033821614583331" />
+        <EntityTypeShape EntityType="Model1.Shelter" Width="1.5" PointX="4.875" PointY="1.25" Height="1.211080729166667" />
+      </Diagram>
+    </edmx:Diagrams>
+  </edmx:Designer>
+</edmx:Edmx>

=== modified file 'VS2008/Tests/MySql.Data.Entity.Tests/MySql.Data.Entity.Tests.csproj'
--- a/VS2008/Tests/MySql.Data.Entity.Tests/MySql.Data.Entity.Tests.csproj	2011-06-21 18:51:27 +0000
+++ b/VS2008/Tests/MySql.Data.Entity.Tests/MySql.Data.Entity.Tests.csproj	2011-06-23 13:59:14 +0000
@@ -82,20 +82,10 @@ <?xml version="1.0" encoding="utf-8"?
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\AggregateOperators.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\CanonicalFunctions.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\DataTypeTests.cs" />
-    <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\Model1.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Model1.edmx</DependentUpon>
-    </Compile>
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\ProviderServicesTests.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\ProceduresAndFunctions.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\JoinTests.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\SchemaInformation.cs" />
-    <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\TestModel.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>TestModel.edmx</DependentUpon>
-    </Compile>
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\Wizard.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\RelationalOperators.cs" />
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\SetOperators.cs" />
@@ -108,10 +98,28 @@ <?xml version="1.0" encoding="utf-8"?
     <Compile Include="..\..\..\Tests\MySql.Data.Entity.Tests\Properties\AssemblyInfo.cs">
       <Link>Properties\AssemblyInfo.cs</Link>
     </Compile>
+    <Compile Include="Model1.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Model1.edmx</DependentUpon>
+    </Compile>
     <Compile Include="Properties\SQLSyntax.Designer.cs" />
+    <Compile Include="TestModel.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>TestModel.edmx</DependentUpon>
+    </Compile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\..\Tests\MySql.Data.Entity.Tests\App.Config" />
+    <EntityDeploy Include="Model1.edmx">
+      <Generator>EntityModelCodeGenerator</Generator>
+      <LastGenOutput>Model1.Designer.cs</LastGenOutput>
+    </EntityDeploy>
+    <EntityDeploy Include="TestModel.edmx">
+      <Generator>EntityModelCodeGenerator</Generator>
+      <LastGenOutput>TestModel.Designer.cs</LastGenOutput>
+    </EntityDeploy>
     <EmbeddedResource Include="..\..\..\Tests\MySql.Data.Entity.Tests\Properties\procs.sql">
       <Link>Properties\procs.sql</Link>
     </EmbeddedResource>
@@ -123,16 +131,6 @@ <?xml version="1.0" encoding="utf-8"?
       <Link>Properties\Resources.resx</Link>
     </EmbeddedResource>
     <EmbeddedResource Include="Properties\SQLSyntax.resx" />
-    <EntityDeploy Include="..\..\..\Tests\MySql.Data.Entity.Tests\Model1.edmx">
-      <Generator>EntityModelCodeGenerator</Generator>
-      <LastGenOutput>Model1.Designer.cs</LastGenOutput>
-    </EntityDeploy>
-  </ItemGroup>
-  <ItemGroup>
-    <EntityDeploy Include="..\..\..\Tests\MySql.Data.Entity.Tests\TestModel.edmx">
-      <Generator>EntityModelCodeGenerator</Generator>
-      <LastGenOutput>TestModel.Designer.cs</LastGenOutput>
-    </EntityDeploy>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Source\MySql.Data.Entity\MySql.Data.Entity.csproj">

=== added file 'VS2008/Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs'
--- a/VS2008/Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs	1970-01-01 00:00:00 +0000
+++ b/VS2008/Tests/MySql.Data.Entity.Tests/TestModel.Designer.cs	2011-06-23 13:59:14 +0000
@@ -0,0 +1,2159 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.5446
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
+[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Toys_Supplier", "Supplier", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Company), "Toys", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Toy))]
+[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Orders_Store", "Store", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Store), "Orders", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Order))]
+[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Books_Authors", "Authors", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Author), "Books", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Book))]
+[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("testModel", "FK_Books_Publishers", "Publishers", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(MySql.Data.Entity.Tests.Publisher), "Books", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(MySql.Data.Entity.Tests.Book))]
+
+// Original file name:
+// Generation date: 6/23/2011 7:23:19 AM
+namespace MySql.Data.Entity.Tests
+{
+    
+    /// <summary>
+    /// There are no comments for testEntities in the schema.
+    /// </summary>
+    public partial class testEntities : global::System.Data.Objects.ObjectContext
+    {
+        /// <summary>
+        /// Initializes a new testEntities object using the connection string found in the 'testEntities' section of the application configuration file.
+        /// </summary>
+        public testEntities() : 
+                base("name=testEntities", "testEntities")
+        {
+            this.OnContextCreated();
+        }
+        /// <summary>
+        /// Initialize a new testEntities object.
+        /// </summary>
+        public testEntities(string connectionString) : 
+                base(connectionString, "testEntities")
+        {
+            this.OnContextCreated();
+        }
+        /// <summary>
+        /// Initialize a new testEntities object.
+        /// </summary>
+        public testEntities(global::System.Data.EntityClient.EntityConnection connection) : 
+                base(connection, "testEntities")
+        {
+            this.OnContextCreated();
+        }
+        partial void OnContextCreated();
+        /// <summary>
+        /// There are no comments for Employees in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Employee> Employees
+        {
+            get
+            {
+                if ((this._Employees == null))
+                {
+                    this._Employees = base.CreateQuery<Employee>("[Employees]");
+                }
+                return this._Employees;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Employee> _Employees;
+        /// <summary>
+        /// There are no comments for Children in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Child> Children
+        {
+            get
+            {
+                if ((this._Children == null))
+                {
+                    this._Children = base.CreateQuery<Child>("[Children]");
+                }
+                return this._Children;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Child> _Children;
+        /// <summary>
+        /// There are no comments for Companies in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Company> Companies
+        {
+            get
+            {
+                if ((this._Companies == null))
+                {
+                    this._Companies = base.CreateQuery<Company>("[Companies]");
+                }
+                return this._Companies;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Company> _Companies;
+        /// <summary>
+        /// There are no comments for Toys in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Toy> Toys
+        {
+            get
+            {
+                if ((this._Toys == null))
+                {
+                    this._Toys = base.CreateQuery<Toy>("[Toys]");
+                }
+                return this._Toys;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Toy> _Toys;
+        /// <summary>
+        /// There are no comments for Stores in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Store> Stores
+        {
+            get
+            {
+                if ((this._Stores == null))
+                {
+                    this._Stores = base.CreateQuery<Store>("[Stores]");
+                }
+                return this._Stores;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Store> _Stores;
+        /// <summary>
+        /// There are no comments for Orders in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Order> Orders
+        {
+            get
+            {
+                if ((this._Orders == null))
+                {
+                    this._Orders = base.CreateQuery<Order>("[Orders]");
+                }
+                return this._Orders;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Order> _Orders;
+        /// <summary>
+        /// There are no comments for Books in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Book> Books
+        {
+            get
+            {
+                if ((this._Books == null))
+                {
+                    this._Books = base.CreateQuery<Book>("[Books]");
+                }
+                return this._Books;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Book> _Books;
+        /// <summary>
+        /// There are no comments for Authors in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Author> Authors
+        {
+            get
+            {
+                if ((this._Authors == null))
+                {
+                    this._Authors = base.CreateQuery<Author>("[Authors]");
+                }
+                return this._Authors;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Author> _Authors;
+        /// <summary>
+        /// There are no comments for Publishers in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Publisher> Publishers
+        {
+            get
+            {
+                if ((this._Publishers == null))
+                {
+                    this._Publishers = base.CreateQuery<Publisher>("[Publishers]");
+                }
+                return this._Publishers;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Publisher> _Publishers;
+        /// <summary>
+        /// There are no comments for DataTypeTests in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<DataTypeTest> DataTypeTests
+        {
+            get
+            {
+                if ((this._DataTypeTests == null))
+                {
+                    this._DataTypeTests = base.CreateQuery<DataTypeTest>("[DataTypeTests]");
+                }
+                return this._DataTypeTests;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<DataTypeTest> _DataTypeTests;
+        /// <summary>
+        /// There are no comments for Computers in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Computer> Computers
+        {
+            get
+            {
+                if ((this._Computers == null))
+                {
+                    this._Computers = base.CreateQuery<Computer>("[Computers]");
+                }
+                return this._Computers;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Computer> _Computers;
+        /// <summary>
+        /// There are no comments for Products in the schema.
+        /// </summary>
+        public global::System.Data.Objects.ObjectQuery<Product> Products
+        {
+            get
+            {
+                if ((this._Products == null))
+                {
+                    this._Products = base.CreateQuery<Product>("[Products]");
+                }
+                return this._Products;
+            }
+        }
+        private global::System.Data.Objects.ObjectQuery<Product> _Products;
+        /// <summary>
+        /// There are no comments for Employees in the schema.
+        /// </summary>
+        public void AddToEmployees(Employee employee)
+        {
+            base.AddObject("Employees", employee);
+        }
+        /// <summary>
+        /// There are no comments for Children in the schema.
+        /// </summary>
+        public void AddToChildren(Child child)
+        {
+            base.AddObject("Children", child);
+        }
+        /// <summary>
+        /// There are no comments for Companies in the schema.
+        /// </summary>
+        public void AddToCompanies(Company company)
+        {
+            base.AddObject("Companies", company);
+        }
+        /// <summary>
+        /// There are no comments for Toys in the schema.
+        /// </summary>
+        public void AddToToys(Toy toy)
+        {
+            base.AddObject("Toys", toy);
+        }
+        /// <summary>
+        /// There are no comments for Stores in the schema.
+        /// </summary>
+        public void AddToStores(Store store)
+        {
+            base.AddObject("Stores", store);
+        }
+        /// <summary>
+        /// There are no comments for Orders in the schema.
+        /// </summary>
+        public void AddToOrders(Order order)
+        {
+            base.AddObject("Orders", order);
+        }
+        /// <summary>
+        /// There are no comments for Books in the schema.
+        /// </summary>
+        public void AddToBooks(Book book)
+        {
+            base.AddObject("Books", book);
+        }
+        /// <summary>
+        /// There are no comments for Authors in the schema.
+        /// </summary>
+        public void AddToAuthors(Author author)
+        {
+            base.AddObject("Authors", author);
+        }
+        /// <summary>
+        /// There are no comments for Publishers in the schema.
+        /// </summary>
+        public void AddToPublishers(Publisher publisher)
+        {
+            base.AddObject("Publishers", publisher);
+        }
+        /// <summary>
+        /// There are no comments for DataTypeTests in the schema.
+        /// </summary>
+        public void AddToDataTypeTests(DataTypeTest dataTypeTest)
+        {
+            base.AddObject("DataTypeTests", dataTypeTest);
+        }
+        /// <summary>
+        /// There are no comments for Computers in the schema.
+        /// </summary>
+        public void AddToComputers(Computer computer)
+        {
+            base.AddObject("Computers", computer);
+        }
+        /// <summary>
+        /// There are no comments for Products in the schema.
+        /// </summary>
+        public void AddToProducts(Product product)
+        {
+            base.AddObject("Products", product);
+        }
+    }
+    /// <summary>
+    /// There are no comments for testModel.Employee in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Employee")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.SalariedEmployee))]
+    public partial class Employee : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Employee object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="lastName">Initial value of LastName.</param>
+        /// <param name="firstName">Initial value of FirstName.</param>
+        public static Employee CreateEmployee(int id, string lastName, string firstName)
+        {
+            Employee employee = new Employee();
+            employee.Id = id;
+            employee.LastName = lastName;
+            employee.FirstName = firstName;
+            return employee;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property LastName in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string LastName
+        {
+            get
+            {
+                return this._LastName;
+            }
+            set
+            {
+                this.OnLastNameChanging(value);
+                this.ReportPropertyChanging("LastName");
+                this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("LastName");
+                this.OnLastNameChanged();
+            }
+        }
+        private string _LastName;
+        partial void OnLastNameChanging(string value);
+        partial void OnLastNameChanged();
+        /// <summary>
+        /// There are no comments for Property FirstName in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string FirstName
+        {
+            get
+            {
+                return this._FirstName;
+            }
+            set
+            {
+                this.OnFirstNameChanging(value);
+                this.ReportPropertyChanging("FirstName");
+                this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("FirstName");
+                this.OnFirstNameChanged();
+            }
+        }
+        private string _FirstName;
+        partial void OnFirstNameChanging(string value);
+        partial void OnFirstNameChanged();
+        /// <summary>
+        /// There are no comments for Property Age in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<int> Age
+        {
+            get
+            {
+                return this._Age;
+            }
+            set
+            {
+                this.OnAgeChanging(value);
+                this.ReportPropertyChanging("Age");
+                this._Age = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Age");
+                this.OnAgeChanged();
+            }
+        }
+        private global::System.Nullable<int> _Age;
+        partial void OnAgeChanging(global::System.Nullable<int> value);
+        partial void OnAgeChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.SalariedEmployee in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="SalariedEmployee")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class SalariedEmployee : Employee
+    {
+        /// <summary>
+        /// Create a new SalariedEmployee object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="lastName">Initial value of LastName.</param>
+        /// <param name="firstName">Initial value of FirstName.</param>
+        /// <param name="salary">Initial value of Salary.</param>
+        public static SalariedEmployee CreateSalariedEmployee(int id, string lastName, string firstName, int salary)
+        {
+            SalariedEmployee salariedEmployee = new SalariedEmployee();
+            salariedEmployee.Id = id;
+            salariedEmployee.LastName = lastName;
+            salariedEmployee.FirstName = firstName;
+            salariedEmployee.Salary = salary;
+            return salariedEmployee;
+        }
+        /// <summary>
+        /// There are no comments for Property Salary in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Salary
+        {
+            get
+            {
+                return this._Salary;
+            }
+            set
+            {
+                this.OnSalaryChanging(value);
+                this.ReportPropertyChanging("Salary");
+                this._Salary = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Salary");
+                this.OnSalaryChanged();
+            }
+        }
+        private int _Salary;
+        partial void OnSalaryChanging(int value);
+        partial void OnSalaryChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.Child in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Child")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Child : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Child object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="employeeID">Initial value of EmployeeID.</param>
+        /// <param name="lastName">Initial value of LastName.</param>
+        /// <param name="firstName">Initial value of FirstName.</param>
+        /// <param name="modified">Initial value of Modified.</param>
+        public static Child CreateChild(long id, int employeeID, string lastName, string firstName, global::System.DateTime modified)
+        {
+            Child child = new Child();
+            child.Id = id;
+            child.EmployeeID = employeeID;
+            child.LastName = lastName;
+            child.FirstName = firstName;
+            child.Modified = modified;
+            return child;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public long Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private long _Id;
+        partial void OnIdChanging(long value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property EmployeeID in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int EmployeeID
+        {
+            get
+            {
+                return this._EmployeeID;
+            }
+            set
+            {
+                this.OnEmployeeIDChanging(value);
+                this.ReportPropertyChanging("EmployeeID");
+                this._EmployeeID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("EmployeeID");
+                this.OnEmployeeIDChanged();
+            }
+        }
+        private int _EmployeeID;
+        partial void OnEmployeeIDChanging(int value);
+        partial void OnEmployeeIDChanged();
+        /// <summary>
+        /// There are no comments for Property LastName in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string LastName
+        {
+            get
+            {
+                return this._LastName;
+            }
+            set
+            {
+                this.OnLastNameChanging(value);
+                this.ReportPropertyChanging("LastName");
+                this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("LastName");
+                this.OnLastNameChanged();
+            }
+        }
+        private string _LastName;
+        partial void OnLastNameChanging(string value);
+        partial void OnLastNameChanged();
+        /// <summary>
+        /// There are no comments for Property FirstName in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string FirstName
+        {
+            get
+            {
+                return this._FirstName;
+            }
+            set
+            {
+                this.OnFirstNameChanging(value);
+                this.ReportPropertyChanging("FirstName");
+                this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("FirstName");
+                this.OnFirstNameChanged();
+            }
+        }
+        private string _FirstName;
+        partial void OnFirstNameChanging(string value);
+        partial void OnFirstNameChanged();
+        /// <summary>
+        /// There are no comments for Property BirthTime in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<global::System.TimeSpan> BirthTime
+        {
+            get
+            {
+                return this._BirthTime;
+            }
+            set
+            {
+                this.OnBirthTimeChanging(value);
+                this.ReportPropertyChanging("BirthTime");
+                this._BirthTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("BirthTime");
+                this.OnBirthTimeChanged();
+            }
+        }
+        private global::System.Nullable<global::System.TimeSpan> _BirthTime;
+        partial void OnBirthTimeChanging(global::System.Nullable<global::System.TimeSpan> value);
+        partial void OnBirthTimeChanged();
+        /// <summary>
+        /// There are no comments for Property BirthWeight in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<double> BirthWeight
+        {
+            get
+            {
+                return this._BirthWeight;
+            }
+            set
+            {
+                this.OnBirthWeightChanging(value);
+                this.ReportPropertyChanging("BirthWeight");
+                this._BirthWeight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("BirthWeight");
+                this.OnBirthWeightChanged();
+            }
+        }
+        private global::System.Nullable<double> _BirthWeight;
+        partial void OnBirthWeightChanging(global::System.Nullable<double> value);
+        partial void OnBirthWeightChanged();
+        /// <summary>
+        /// There are no comments for Property Modified in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.DateTime Modified
+        {
+            get
+            {
+                return this._Modified;
+            }
+            set
+            {
+                this.OnModifiedChanging(value);
+                this.ReportPropertyChanging("Modified");
+                this._Modified = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Modified");
+                this.OnModifiedChanged();
+            }
+        }
+        private global::System.DateTime _Modified;
+        partial void OnModifiedChanging(global::System.DateTime value);
+        partial void OnModifiedChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.Company in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Company")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Company : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Company object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        /// <param name="address">Initial value of Address.</param>
+        public static Company CreateCompany(int id, string name, CommonAddress address)
+        {
+            Company company = new Company();
+            company.Id = id;
+            company.Name = name;
+            company.Address = global::System.Data.Objects.DataClasses.StructuralObject.VerifyComplexObjectIsNotNull(address, "Address");
+            return company;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property DateBegan in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<global::System.DateTime> DateBegan
+        {
+            get
+            {
+                return this._DateBegan;
+            }
+            set
+            {
+                this.OnDateBeganChanging(value);
+                this.ReportPropertyChanging("DateBegan");
+                this._DateBegan = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("DateBegan");
+                this.OnDateBeganChanged();
+            }
+        }
+        private global::System.Nullable<global::System.DateTime> _DateBegan;
+        partial void OnDateBeganChanging(global::System.Nullable<global::System.DateTime> value);
+        partial void OnDateBeganChanged();
+        /// <summary>
+        /// There are no comments for Property NumEmployees in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<int> NumEmployees
+        {
+            get
+            {
+                return this._NumEmployees;
+            }
+            set
+            {
+                this.OnNumEmployeesChanging(value);
+                this.ReportPropertyChanging("NumEmployees");
+                this._NumEmployees = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("NumEmployees");
+                this.OnNumEmployeesChanged();
+            }
+        }
+        private global::System.Nullable<int> _NumEmployees;
+        partial void OnNumEmployeesChanging(global::System.Nullable<int> value);
+        partial void OnNumEmployeesChanged();
+        /// <summary>
+        /// There are no comments for Property Address in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
+        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+        [global::System.Xml.Serialization.XmlElement(IsNullable=true)]
+        [global::System.Xml.Serialization.SoapElement(IsNullable=true)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public CommonAddress Address
+        {
+            get
+            {
+                this._Address = this.GetValidValue(this._Address, "Address", false, this._AddressInitialized);
+                this._AddressInitialized = true;
+                return this._Address;
+            }
+            set
+            {
+                this.OnAddressChanging(value);
+                this.ReportPropertyChanging("Address");
+                this._Address = this.SetValidValue(this._Address, value, "Address");
+                this._AddressInitialized = true;
+                this.ReportPropertyChanged("Address");
+                this.OnAddressChanged();
+            }
+        }
+        private CommonAddress _Address;
+        private bool _AddressInitialized;
+        partial void OnAddressChanging(CommonAddress value);
+        partial void OnAddressChanged();
+        /// <summary>
+        /// There are no comments for Toys in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Toys_Supplier", "Toys")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityCollection<Toy> Toys
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Toy>("testModel.FK_Toys_Supplier", "Toys");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Toy>("testModel.FK_Toys_Supplier", "Toys", value);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// There are no comments for testModel.Toy in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Toy")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Toy : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Toy object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        /// <param name="minAge">Initial value of MinAge.</param>
+        public static Toy CreateToy(int id, string name, int minAge)
+        {
+            Toy toy = new Toy();
+            toy.Id = id;
+            toy.Name = name;
+            toy.MinAge = minAge;
+            return toy;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property MinAge in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int MinAge
+        {
+            get
+            {
+                return this._MinAge;
+            }
+            set
+            {
+                this.OnMinAgeChanging(value);
+                this.ReportPropertyChanging("MinAge");
+                this._MinAge = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("MinAge");
+                this.OnMinAgeChanged();
+            }
+        }
+        private int _MinAge;
+        partial void OnMinAgeChanging(int value);
+        partial void OnMinAgeChanged();
+        /// <summary>
+        /// There are no comments for Supplier in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Toys_Supplier", "Supplier")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public Company Supplier
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier").Value;
+            }
+            set
+            {
+                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier").Value = value;
+            }
+        }
+        /// <summary>
+        /// There are no comments for Supplier in the schema.
+        /// </summary>
+        [global::System.ComponentModel.BrowsableAttribute(false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityReference<Company> SupplierReference
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Company>("testModel.FK_Toys_Supplier", "Supplier", value);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// There are no comments for ComplexType testModel.CommonAddress in the schema.
+    /// </summary>
+    [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName="testModel", Name="CommonAddress")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class CommonAddress : global::System.Data.Objects.DataClasses.ComplexObject
+    {
+        /// <summary>
+        /// There are no comments for Property Address in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Address
+        {
+            get
+            {
+                return this._Address;
+            }
+            set
+            {
+                this.OnAddressChanging(value);
+                this.ReportPropertyChanging("Address");
+                this._Address = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("Address");
+                this.OnAddressChanged();
+            }
+        }
+        private string _Address;
+        partial void OnAddressChanging(string value);
+        partial void OnAddressChanged();
+        /// <summary>
+        /// There are no comments for Property City in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string City
+        {
+            get
+            {
+                return this._City;
+            }
+            set
+            {
+                this.OnCityChanging(value);
+                this.ReportPropertyChanging("City");
+                this._City = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("City");
+                this.OnCityChanged();
+            }
+        }
+        private string _City;
+        partial void OnCityChanging(string value);
+        partial void OnCityChanged();
+        /// <summary>
+        /// There are no comments for Property State in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string State
+        {
+            get
+            {
+                return this._State;
+            }
+            set
+            {
+                this.OnStateChanging(value);
+                this.ReportPropertyChanging("State");
+                this._State = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("State");
+                this.OnStateChanged();
+            }
+        }
+        private string _State;
+        partial void OnStateChanging(string value);
+        partial void OnStateChanged();
+        /// <summary>
+        /// There are no comments for Property ZipCode in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string ZipCode
+        {
+            get
+            {
+                return this._ZipCode;
+            }
+            set
+            {
+                this.OnZipCodeChanging(value);
+                this.ReportPropertyChanging("ZipCode");
+                this._ZipCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("ZipCode");
+                this.OnZipCodeChanged();
+            }
+        }
+        private string _ZipCode;
+        partial void OnZipCodeChanging(string value);
+        partial void OnZipCodeChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.Store in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Store")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Store : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Store object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        public static Store CreateStore(int id, string name)
+        {
+            Store store = new Store();
+            store.Id = id;
+            store.Name = name;
+            return store;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property Address in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Address
+        {
+            get
+            {
+                return this._Address;
+            }
+            set
+            {
+                this.OnAddressChanging(value);
+                this.ReportPropertyChanging("Address");
+                this._Address = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("Address");
+                this.OnAddressChanged();
+            }
+        }
+        private string _Address;
+        partial void OnAddressChanging(string value);
+        partial void OnAddressChanged();
+        /// <summary>
+        /// There are no comments for Property City in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string City
+        {
+            get
+            {
+                return this._City;
+            }
+            set
+            {
+                this.OnCityChanging(value);
+                this.ReportPropertyChanging("City");
+                this._City = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("City");
+                this.OnCityChanged();
+            }
+        }
+        private string _City;
+        partial void OnCityChanging(string value);
+        partial void OnCityChanged();
+        /// <summary>
+        /// There are no comments for Property State in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string State
+        {
+            get
+            {
+                return this._State;
+            }
+            set
+            {
+                this.OnStateChanging(value);
+                this.ReportPropertyChanging("State");
+                this._State = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("State");
+                this.OnStateChanged();
+            }
+        }
+        private string _State;
+        partial void OnStateChanging(string value);
+        partial void OnStateChanged();
+        /// <summary>
+        /// There are no comments for Property ZipCode in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string ZipCode
+        {
+            get
+            {
+                return this._ZipCode;
+            }
+            set
+            {
+                this.OnZipCodeChanging(value);
+                this.ReportPropertyChanging("ZipCode");
+                this._ZipCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("ZipCode");
+                this.OnZipCodeChanged();
+            }
+        }
+        private string _ZipCode;
+        partial void OnZipCodeChanging(string value);
+        partial void OnZipCodeChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.Order in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Order")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Order : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Order object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="freight">Initial value of Freight.</param>
+        public static Order CreateOrder(int id, double freight)
+        {
+            Order order = new Order();
+            order.Id = id;
+            order.Freight = freight;
+            return order;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Freight in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public double Freight
+        {
+            get
+            {
+                return this._Freight;
+            }
+            set
+            {
+                this.OnFreightChanging(value);
+                this.ReportPropertyChanging("Freight");
+                this._Freight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Freight");
+                this.OnFreightChanged();
+            }
+        }
+        private double _Freight;
+        partial void OnFreightChanging(double value);
+        partial void OnFreightChanged();
+        /// <summary>
+        /// There are no comments for Store in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Orders_Store", "Store")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public Store Store
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store").Value;
+            }
+            set
+            {
+                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store").Value = value;
+            }
+        }
+        /// <summary>
+        /// There are no comments for Store in the schema.
+        /// </summary>
+        [global::System.ComponentModel.BrowsableAttribute(false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityReference<Store> StoreReference
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("testModel.FK_Orders_Store", "Store");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Store>("testModel.FK_Orders_Store", "Store", value);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// There are no comments for testModel.Book in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Book")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Book : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Book object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        /// <param name="pages">Initial value of Pages.</param>
+        public static Book CreateBook(int id, string name, int pages)
+        {
+            Book book = new Book();
+            book.Id = id;
+            book.Name = name;
+            book.Pages = pages;
+            return book;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property Pages in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Pages
+        {
+            get
+            {
+                return this._Pages;
+            }
+            set
+            {
+                this.OnPagesChanging(value);
+                this.ReportPropertyChanging("Pages");
+                this._Pages = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Pages");
+                this.OnPagesChanged();
+            }
+        }
+        private int _Pages;
+        partial void OnPagesChanging(int value);
+        partial void OnPagesChanged();
+        /// <summary>
+        /// There are no comments for Author in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Authors", "Authors")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public Author Author
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors").Value;
+            }
+            set
+            {
+                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors").Value = value;
+            }
+        }
+        /// <summary>
+        /// There are no comments for Author in the schema.
+        /// </summary>
+        [global::System.ComponentModel.BrowsableAttribute(false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityReference<Author> AuthorReference
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Author>("testModel.FK_Books_Authors", "Authors");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Author>("testModel.FK_Books_Authors", "Authors", value);

+                }
+            }
+        }
+        /// <summary>
+        /// There are no comments for Publisher in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Publishers", "Publishers")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public Publisher Publisher
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers").Value;
+            }
+            set
+            {
+                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers").Value = value;
+            }
+        }
+        /// <summary>
+        /// There are no comments for Publisher in the schema.
+        /// </summary>
+        [global::System.ComponentModel.BrowsableAttribute(false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityReference<Publisher> PublisherReference
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Publisher>("testModel.FK_Books_Publishers", "Publishers", value);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// There are no comments for testModel.Author in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Author")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Author : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Author object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        public static Author CreateAuthor(int id, string name)
+        {
+            Author author = new Author();
+            author.Id = id;
+            author.Name = name;
+            return author;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property Age in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<int> Age
+        {
+            get
+            {
+                return this._Age;
+            }
+            set
+            {
+                this.OnAgeChanging(value);
+                this.ReportPropertyChanging("Age");
+                this._Age = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Age");
+                this.OnAgeChanged();
+            }
+        }
+        private global::System.Nullable<int> _Age;
+        partial void OnAgeChanging(global::System.Nullable<int> value);
+        partial void OnAgeChanged();
+        /// <summary>
+        /// There are no comments for Books in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Authors", "Books")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityCollection<Book> Books
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Book>("testModel.FK_Books_Authors", "Books");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Book>("testModel.FK_Books_Authors", "Books", value);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// There are no comments for testModel.Publisher in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Publisher")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Publisher : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Publisher object.
+        /// </summary>
+        /// <param name="id">Initial value of id.</param>
+        /// <param name="name">Initial value of name.</param>
+        public static Publisher CreatePublisher(int id, string name)
+        {
+            Publisher publisher = new Publisher();
+            publisher.id = id;
+            publisher.name = name;
+            return publisher;
+        }
+        /// <summary>
+        /// There are no comments for Property id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int id
+        {
+            get
+            {
+                return this._id;
+            }
+            set
+            {
+                this.OnidChanging(value);
+                this.ReportPropertyChanging("id");
+                this._id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("id");
+                this.OnidChanged();
+            }
+        }
+        private int _id;
+        partial void OnidChanging(int value);
+        partial void OnidChanged();
+        /// <summary>
+        /// There are no comments for Property name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string name
+        {
+            get
+            {
+                return this._name;
+            }
+            set
+            {
+                this.OnnameChanging(value);
+                this.ReportPropertyChanging("name");
+                this._name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("name");
+                this.OnnameChanged();
+            }
+        }
+        private string _name;
+        partial void OnnameChanging(string value);
+        partial void OnnameChanged();
+        /// <summary>
+        /// There are no comments for Books in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("testModel", "FK_Books_Publishers", "Books")]
+        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
+        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Data.Objects.DataClasses.EntityCollection<Book> Books
+        {
+            get
+            {
+                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<Book>("testModel.FK_Books_Publishers", "Books");
+            }
+            set
+            {
+                if ((value != null))
+                {
+                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<Book>("testModel.FK_Books_Publishers", "Books", value);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// There are no comments for testModel.DataTypeTest in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="DataTypeTest")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class DataTypeTest : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new DataTypeTest object.
+        /// </summary>
+        /// <param name="id">Initial value of id.</param>
+        /// <param name="id2">Initial value of id2.</param>
+        public static DataTypeTest CreateDataTypeTest(global::System.Guid id, global::System.Guid id2)
+        {
+            DataTypeTest dataTypeTest = new DataTypeTest();
+            dataTypeTest.id = id;
+            dataTypeTest.id2 = id2;
+            return dataTypeTest;
+        }
+        /// <summary>
+        /// There are no comments for Property id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Guid id
+        {
+            get
+            {
+                return this._id;
+            }
+            set
+            {
+                this.OnidChanging(value);
+                this.ReportPropertyChanging("id");
+                this._id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("id");
+                this.OnidChanged();
+            }
+        }
+        private global::System.Guid _id;
+        partial void OnidChanging(global::System.Guid value);
+        partial void OnidChanged();
+        /// <summary>
+        /// There are no comments for Property id2 in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Guid id2
+        {
+            get
+            {
+                return this._id2;
+            }
+            set
+            {
+                this.Onid2Changing(value);
+                this.ReportPropertyChanging("id2");
+                this._id2 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("id2");
+                this.Onid2Changed();
+            }
+        }
+        private global::System.Guid _id2;
+        partial void Onid2Changing(global::System.Guid value);
+        partial void Onid2Changed();
+        /// <summary>
+        /// There are no comments for Property idAsChar in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string idAsChar
+        {
+            get
+            {
+                return this._idAsChar;
+            }
+            set
+            {
+                this.OnidAsCharChanging(value);
+                this.ReportPropertyChanging("idAsChar");
+                this._idAsChar = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("idAsChar");
+                this.OnidAsCharChanged();
+            }
+        }
+        private string _idAsChar;
+        partial void OnidAsCharChanging(string value);
+        partial void OnidAsCharChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.Computer in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Computer")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.DesktopComputer))]
+    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.LaptopComputer))]
+    [global::System.Runtime.Serialization.KnownTypeAttribute(typeof(global::MySql.Data.Entity.Tests.TabletComputer))]
+    public abstract partial class Computer : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// There are no comments for Property Brand in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Brand
+        {
+            get
+            {
+                return this._Brand;
+            }
+            set
+            {
+                this.OnBrandChanging(value);
+                this.ReportPropertyChanging("Brand");
+                this._Brand = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Brand");
+                this.OnBrandChanged();
+            }
+        }
+        private string _Brand;
+        partial void OnBrandChanging(string value);
+        partial void OnBrandChanged();
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.DesktopComputer in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="DesktopComputer")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class DesktopComputer : Computer
+    {
+        /// <summary>
+        /// Create a new DesktopComputer object.
+        /// </summary>
+        /// <param name="brand">Initial value of Brand.</param>
+        /// <param name="id">Initial value of Id.</param>
+        public static DesktopComputer CreateDesktopComputer(string brand, int id)
+        {
+            DesktopComputer desktopComputer = new DesktopComputer();
+            desktopComputer.Brand = brand;
+            desktopComputer.Id = id;
+            return desktopComputer;
+        }
+        /// <summary>
+        /// There are no comments for Property Color in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Color
+        {
+            get
+            {
+                return this._Color;
+            }
+            set
+            {
+                this.OnColorChanging(value);
+                this.ReportPropertyChanging("Color");
+                this._Color = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("Color");
+                this.OnColorChanged();
+            }
+        }
+        private string _Color;
+        partial void OnColorChanging(string value);
+        partial void OnColorChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.LaptopComputer in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="LaptopComputer")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class LaptopComputer : Computer
+    {
+        /// <summary>
+        /// Create a new LaptopComputer object.
+        /// </summary>
+        /// <param name="brand">Initial value of Brand.</param>
+        /// <param name="id">Initial value of Id.</param>
+        public static LaptopComputer CreateLaptopComputer(string brand, int id)
+        {
+            LaptopComputer laptopComputer = new LaptopComputer();
+            laptopComputer.Brand = brand;
+            laptopComputer.Id = id;
+            return laptopComputer;
+        }
+        /// <summary>
+        /// There are no comments for Property IsCertified in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<bool> IsCertified
+        {
+            get
+            {
+                return this._IsCertified;
+            }
+            set
+            {
+                this.OnIsCertifiedChanging(value);
+                this.ReportPropertyChanging("IsCertified");
+                this._IsCertified = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("IsCertified");
+                this.OnIsCertifiedChanged();
+            }
+        }
+        private global::System.Nullable<bool> _IsCertified;
+        partial void OnIsCertifiedChanging(global::System.Nullable<bool> value);
+        partial void OnIsCertifiedChanged();
+        /// <summary>
+        /// There are no comments for Property Size in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Size
+        {
+            get
+            {
+                return this._Size;
+            }
+            set
+            {
+                this.OnSizeChanging(value);
+                this.ReportPropertyChanging("Size");
+                this._Size = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
+                this.ReportPropertyChanged("Size");
+                this.OnSizeChanged();
+            }
+        }
+        private string _Size;
+        partial void OnSizeChanging(string value);
+        partial void OnSizeChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.TabletComputer in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="TabletComputer")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class TabletComputer : Computer
+    {
+        /// <summary>
+        /// Create a new TabletComputer object.
+        /// </summary>
+        /// <param name="brand">Initial value of Brand.</param>
+        /// <param name="id">Initial value of Id.</param>
+        public static TabletComputer CreateTabletComputer(string brand, int id)
+        {
+            TabletComputer tabletComputer = new TabletComputer();
+            tabletComputer.Brand = brand;
+            tabletComputer.Id = id;
+            return tabletComputer;
+        }
+        /// <summary>
+        /// There are no comments for Property IsAvailable in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<bool> IsAvailable
+        {
+            get
+            {
+                return this._IsAvailable;
+            }
+            set
+            {
+                this.OnIsAvailableChanging(value);
+                this.ReportPropertyChanging("IsAvailable");
+                this._IsAvailable = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("IsAvailable");
+                this.OnIsAvailableChanged();
+            }
+        }
+        private global::System.Nullable<bool> _IsAvailable;
+        partial void OnIsAvailableChanging(global::System.Nullable<bool> value);
+        partial void OnIsAvailableChanged();
+        /// <summary>
+        /// There are no comments for Property ReleaseDate in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.Nullable<global::System.DateTime> ReleaseDate
+        {
+            get
+            {
+                return this._ReleaseDate;
+            }
+            set
+            {
+                this.OnReleaseDateChanging(value);
+                this.ReportPropertyChanging("ReleaseDate");
+                this._ReleaseDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("ReleaseDate");
+                this.OnReleaseDateChanged();
+            }
+        }
+        private global::System.Nullable<global::System.DateTime> _ReleaseDate;
+        partial void OnReleaseDateChanging(global::System.Nullable<global::System.DateTime> value);
+        partial void OnReleaseDateChanged();
+    }
+    /// <summary>
+    /// There are no comments for testModel.Product in the schema.
+    /// </summary>
+    /// <KeyProperties>
+    /// Id
+    /// </KeyProperties>
+    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="testModel", Name="Product")]
+    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
+    [global::System.Serializable()]
+    public partial class Product : global::System.Data.Objects.DataClasses.EntityObject
+    {
+        /// <summary>
+        /// Create a new Product object.
+        /// </summary>
+        /// <param name="id">Initial value of Id.</param>
+        /// <param name="name">Initial value of Name.</param>
+        /// <param name="createdDate">Initial value of CreatedDate.</param>
+        public static Product CreateProduct(int id, string name, global::System.DateTime createdDate)
+        {
+            Product product = new Product();
+            product.Id = id;
+            product.Name = name;
+            product.CreatedDate = createdDate;
+            return product;
+        }
+        /// <summary>
+        /// There are no comments for Property Id in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public int Id
+        {
+            get
+            {
+                return this._Id;
+            }
+            set
+            {
+                this.OnIdChanging(value);
+                this.ReportPropertyChanging("Id");
+                this._Id = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("Id");
+                this.OnIdChanged();
+            }
+        }
+        private int _Id;
+        partial void OnIdChanging(int value);
+        partial void OnIdChanged();
+        /// <summary>
+        /// There are no comments for Property Name in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public string Name
+        {
+            get
+            {
+                return this._Name;
+            }
+            set
+            {
+                this.OnNameChanging(value);
+                this.ReportPropertyChanging("Name");
+                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
+                this.ReportPropertyChanged("Name");
+                this.OnNameChanged();
+            }
+        }
+        private string _Name;
+        partial void OnNameChanging(string value);
+        partial void OnNameChanged();
+        /// <summary>
+        /// There are no comments for Property CreatedDate in the schema.
+        /// </summary>
+        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
+        [global::System.Runtime.Serialization.DataMemberAttribute()]
+        public global::System.DateTime CreatedDate
+        {
+            get
+            {
+                return this._CreatedDate;
+            }
+            set
+            {
+                this.OnCreatedDateChanging(value);
+                this.ReportPropertyChanging("CreatedDate");
+                this._CreatedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+                this.ReportPropertyChanged("CreatedDate");
+                this.OnCreatedDateChanged();
+            }
+        }
+        private global::System.DateTime _CreatedDate;
+        partial void OnCreatedDateChanging(global::System.DateTime value);
+        partial void OnCreatedDateChanged();
+    }
+}

=== added file 'VS2008/Tests/MySql.Data.Entity.Tests/TestModel.edmx'
--- a/VS2008/Tests/MySql.Data.Entity.Tests/TestModel.edmx	1970-01-01 00:00:00 +0000
+++ b/VS2008/Tests/MySql.Data.Entity.Tests/TestModel.edmx	2011-06-23 13:59:14 +0000
@@ -0,0 +1,770 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
+    <!-- EF Runtime content -->
+  <edmx:Runtime>
+    <!-- SSDL content -->
+    <edmx:StorageModels>
+      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl" Namespace="testModel.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5">
+        <EntityContainer Name="testContainer" >
+          <EntitySet Name="Employees" EntityType="testModel.Store.Employees" />
+          <EntitySet Name="EmployeeChildren" EntityType="testModel.Store.EmployeeChildren" />
+          <EntitySet Name="SalariedEmployees" EntityType ="testModel.Store.SalariedEmployees"/>
+          <EntitySet Name="Toys" EntityType ="testModel.Store.Toys"/>
+          <EntitySet Name="Companies" EntityType ="testModel.Store.Companies"/>
+          <EntitySet Name="Stores" EntityType ="testModel.Store.Stores"/>
+          <EntitySet Name="Orders" EntityType ="testModel.Store.Orders"/>
+          <AssociationSet Name="FK_Toys_Supplier" Association ="testModel.Store.FK_Toys_Supplier">
+            <End Role="Supplier" EntitySet ="Companies"/>
+            <End Role="Toys" EntitySet ="Toys"/>
+          </AssociationSet>
+          <!--    <AssociationSet Name="FK_Orders_Stores" Association ="testModel.Store.FK_Orders_Stores">
+      <End Role="Stores" EntitySet ="Stores"/>
+      <End Role="Orders" EntitySet ="Orders"/>
+    </AssociationSet>-->
+          <EntitySet Name="Books" EntityType ="testModel.Store.Books"/>
+          <EntitySet Name="Authors" EntityType ="testModel.Store.Authors"/>
+          <EntitySet Name="Publishers" EntityType ="testModel.Store.Publishers"/>
+          <AssociationSet Name="FK_Books_Authors" Association="testModel.Store.FK_Books_Authors">
+            <End Role="Authors" EntitySet="Authors" />
+            <End Role="Books" EntitySet="Books" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Books_Publishers" Association="testModel.Store.FK_Books_Publishers">
+            <End Role="Publishers" EntitySet="Publishers" />
+            <End Role="Books" EntitySet="Books" />
+          </AssociationSet>
+          <EntitySet Name="DataTypeTests" EntityType="testModel.Store.DataTypeTests"/>
+          <EntitySet Name="Computers" EntityType="testModel.Store.Computers" />
+          <EntitySet Name="DesktopComputers" EntityType="testModel.Store.DesktopComputers" />
+          <EntitySet Name="LaptopComputers" EntityType="testModel.Store.LaptopComputers" />
+          <EntitySet Name="TabletComputers" EntityType="testModel.Store.TabletComputers" />
+          <AssociationSet Name="FK_DesktopComputer_Computer" Association="testModel.Store.FK_DesktopComputer_Computer">
+            <End Role="Computers" EntitySet="Computers" />
+            <End Role="DesktopComputers" EntitySet="DesktopComputers" />
+          </AssociationSet>
+          <AssociationSet Name="FK_LaptopComputer_Computer" Association="testModel.Store.FK_LaptopComputer_Computer">
+            <End Role="Computers" EntitySet="Computers" />
+            <End Role="LaptopComputers" EntitySet="LaptopComputers" />
+          </AssociationSet>
+          <AssociationSet Name="FK_TabletComputer_Computer" Association="testModel.Store.FK_TabletComputer_Computer">
+            <End Role="Computers" EntitySet="Computers" />
+            <End Role="TabletComputers" EntitySet="TabletComputers" />
+          </AssociationSet>
+          <EntitySet Name="Products" EntityType="testModel.Store.Products" />
+        </EntityContainer>
+
+        <EntityType Name="Employees">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false"/>
+          <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="20" />
+          <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="10" />
+          <Property Name="Age" Type="int" Nullable="true"/>
+        </EntityType>
+
+        <EntityType Name="SalariedEmployees" >
+          <Key>
+            <PropertyRef Name="EmployeeId" />
+          </Key>
+          <Property Name="EmployeeId" Type="int" Nullable="false" />
+          <Property Name="Salary" Type="int" Nullable="false" />
+        </EntityType>
+
+        <EntityType Name="EmployeeChildren">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="uint" Nullable="false"/>
+          <Property Name="EmployeeID" Type="int" Nullable="false"/>
+          <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="20" />
+          <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="10" />
+          <Property Name="BirthTime" Type="time" Nullable="true"/>
+          <Property Name="Weight" Type="double" Nullable ="true"/>
+          <Property Name="LastModified" Type="timestamp" Nullable ="false"/>
+        </EntityType>
+
+        <EntityType Name="Companies">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable ="false" StoreGeneratedPattern="Identity"/>
+          <Property Name="Name" Type="varchar" MaxLength ="100" Nullable ="false"/>
+          <Property Name="DateBegan" Type="date" Nullable ="true"/>
+          <Property Name="NumEmployees" Type="int" Nullable ="true"/>
+          <Property Name ="Address" Type="varchar" MaxLength="50"/>
+          <Property Name ="City" Type="varchar" MaxLength ="50"/>
+          <Property Name ="State" Type="char" MaxLength ="2" />
+          <Property Name ="ZipCode" Type="char" MaxLength ="9"/>
+        </EntityType>
+
+        <EntityType Name="Toys">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable ="false" StoreGeneratedPattern="Identity"/>
+          <Property Name="SupplierId" Type="int" Nullable="false"/>
+          <Property Name="Name" Type="varchar" MaxLength="100" Nullable ="false"/>
+          <Property Name="MinAge" Type="int" Nullable ="false"/>
+        </EntityType>
+
+        <Association Name="FK_Toys_Supplier">
+          <End Role="Supplier" Type="testModel.Store.Companies" Multiplicity ="1"/>
+          <End Role="Toys" Type="testModel.Store.Toys" Multiplicity ="*"/>
+          <ReferentialConstraint>
+            <Principal Role="Supplier">
+              <PropertyRef Name="Id"/>
+            </Principal>
+            <Dependent Role="Toys">
+              <PropertyRef Name="SupplierId"/>
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+
+        <EntityType Name="Stores">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable ="false"/>
+          <Property Name="Name" Type="varchar" MaxLength="50" Nullable ="false"/>
+          <Property Name ="Address" Type="varchar" MaxLength="50"/>
+          <Property Name ="City" Type="varchar" MaxLength ="50"/>
+          <Property Name ="State" Type="char" MaxLength ="2" />
+          <Property Name ="ZipCode" Type="char" MaxLength ="9"/>
+        </EntityType>
+
+        <EntityType Name="Orders">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable ="false"/>
+          <Property Name="StoreId" Type="int"/>
+          <Property Name="Freight" Type="double" Nullable ="false"/>
+        </EntityType>
+
+        <!--  <Association Name="FK_Orders_Store">
+    <End Role="Store" Type="testModel.Store.Stores" Multiplicity ="1"/>
+    <End Role="Orders" Type="testModel.Store.Orders" Multiplicity ="*"/>
+    <ReferentialConstraint>
+      <Principal Role="Stores">
+        <PropertyRef Name="Id"/>
+      </Principal>
+      <Dependent Role="Orders">
+        <PropertyRef Name="StoreId"/>
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>-->
+
+        <EntityType Name="Books">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable ="false"/>
+          <Property Name="Name" Type="varchar" MaxLength="20" Nullable ="false"/>
+          <Property Name="Pages" Type="int"/>
+          <Property Name="Author_id" Type="int" Nullable ="false"/>
+          <Property Name="Publisher_id" Type="int" Nullable ="false"/>
+        </EntityType>
+
+        <EntityType Name="Authors">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="int" Nullable ="false"/>
+          <Property Name="Name" Type="varchar" MaxLength="20" Nullable ="false"/>
+          <Property Name="Age" Type="int"/>
+        </EntityType>
+
+        <EntityType Name="Publishers">
+          <Key>
+            <PropertyRef Name="id" />
+          </Key>
+          <Property Name="id" Type="int" Nullable="false" />
+          <Property Name="name" Type="varchar" Nullable="false" MaxLength="20" />
+        </EntityType>
+
+        <Association Name="FK_Books_Authors">
+          <End Role="Authors" Type="testModel.Store.Authors" Multiplicity="1" />
+          <End Role="Books" Type="testModel.Store.Books" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Authors">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="Books">
+              <PropertyRef Name="Author_id" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+
+        <Association Name="FK_Books_Publishers">
+          <End Role="Publishers" Type="testModel.Store.Publishers" Multiplicity="1" />
+          <End Role="Books" Type="testModel.Store.Books" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Publishers">
+              <PropertyRef Name="id" />
+            </Principal>
+            <Dependent Role="Books">
+              <PropertyRef Name="Publisher_id" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+
+        <Function Name="AddAuthor" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="test">
+          <Parameter Name="theid" Type="int" Mode="In" />
+          <Parameter Name="thename" Type="varchar" Mode="In" />
+          <Parameter Name="theage" Type="int" Mode="In" />
+        </Function>
+        <Function Name="DeleteAuthor" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="test">
+          <Parameter Name="theid" Type="int" Mode="In" />
+        </Function>
+        <Function Name="UpdateAuthor" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="test">
+          <Parameter Name="theid" Type="int" Mode="In" />
+          <Parameter Name="thename" Type="varchar" Mode="In" />
+          <Parameter Name="theage" Type="int" Mode="In" />
+        </Function>
+        <Function Name="spFunc" Aggregate="false"
+            BuiltIn="false" NiladicFunction="false" IsComposable="true"
+            ParameterTypeSemantics="AllowImplicitConversion" Schema="test" ReturnType="int">
+          <Parameter Name="id" Type="int" Mode="In" />
+          <Parameter Name="name" Type="varchar" Mode="In" />
+        </Function>
+        <EntityType Name="DataTypeTests">
+          <Key>
+            <PropertyRef Name="id"/>
+          </Key>
+          <Property Name="id" Type="guid" Nullable="false"/>
+          <Property Name="id2" Type="guid" Nullable ="false"/>
+          <Property Name="idAsChar" Type="varchar" MaxLength="36" Nullable="true"/>
+        </EntityType>
+        <EntityType Name="Computers">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Brand" Type="varchar" Nullable="false" MaxLength="100" />
+          <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
+        </EntityType>
+        <EntityType Name="DesktopComputers">
+          <Key>
+            <PropertyRef Name="IdDesktopComputer" />
+          </Key>
+          <Property Name="Color" Type="varchar" MaxLength="15" />
+          <Property Name="IdDesktopComputer" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="LaptopComputers">
+          <Key>
+            <PropertyRef Name="IdLaptopComputer" />
+          </Key>
+          <Property Name="IdLaptopComputer" Type="int" Nullable="false" />
+          <Property Name="IsCertified" Type="bit" />
+          <Property Name="Size" Type="varchar" MaxLength="45" />
+        </EntityType>
+        <EntityType Name="TabletComputers">
+          <Key>
+            <PropertyRef Name="IdTabletComputer" />
+          </Key>
+          <Property Name="IdTabletComputer" Type="int" Nullable="false" />
+          <Property Name="IsAvailable" Type="bit" />
+          <Property Name="ReleaseDate" Type="datetime" />
+        </EntityType>
+        <EntityType Name="Products">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
+          <Property Name="Name" Type="varchar" Nullable="false" MaxLength="45" />
+          <Property Name="CreatedDate" Type="timestamp" Nullable="false" Precision="0" StoreGeneratedPattern="Computed" />
+        </EntityType>
+        <Association Name="FK_DesktopComputer_Computer">
+          <End Role="Computers" Type="testModel.Store.Computers" Multiplicity="1" />
+          <End Role="DesktopComputers" Type="testModel.Store.DesktopComputers" Multiplicity="0..1" />
+          <ReferentialConstraint>
+            <Principal Role="Computers">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="DesktopComputers">
+              <PropertyRef Name="IdDesktopComputer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_LaptopComputer_Computer">
+          <End Role="Computers" Type="testModel.Store.Computers" Multiplicity="1" />
+          <End Role="LaptopComputers" Type="testModel.Store.LaptopComputers" Multiplicity="0..1" />
+          <ReferentialConstraint>
+            <Principal Role="Computers">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="LaptopComputers">
+              <PropertyRef Name="IdLaptopComputer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_TabletComputer_Computer">
+          <End Role="Computers" Type="testModel.Store.Computers" Multiplicity="1" />
+          <End Role="TabletComputers" Type="testModel.Store.TabletComputers" Multiplicity="0..1" />
+          <ReferentialConstraint>
+            <Principal Role="Computers">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="TabletComputers">
+              <PropertyRef Name="IdTabletComputer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>        
+      </Schema>
+    </edmx:StorageModels>
+    
+    <!-- CSDL content -->
+    <edmx:ConceptualModels>
+      <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm" xmlns:cg="http://schemas.microsoft.com/ado/2006/04/codegeneration" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" Namespace="testModel" Alias="Self" >
+        <EntityContainer Name="testEntities" >
+          <EntitySet Name="Employees" EntityType="testModel.Employee" />
+          <EntitySet Name="Children" EntityType="testModel.Child" />
+          <EntitySet Name="Companies" EntityType ="testModel.Company"/>
+          <EntitySet Name="Toys" EntityType ="testModel.Toy"/>
+          <EntitySet Name="Stores" EntityType ="testModel.Store"/>
+          <EntitySet Name="Orders" EntityType ="testModel.Order"/>
+          <AssociationSet Name="FK_Toys_Supplier" Association ="testModel.FK_Toys_Supplier">
+            <End Role="Supplier" EntitySet ="Companies"/>
+            <End Role="Toys" EntitySet ="Toys"/>
+          </AssociationSet>
+          <AssociationSet Name="FK_Orders_Store" Association ="testModel.FK_Orders_Store">
+            <End Role="Store" EntitySet ="Stores"/>
+            <End Role="Orders" EntitySet ="Orders"/>
+          </AssociationSet>
+          <EntitySet Name="Books" EntityType ="testModel.Book"/>
+          <EntitySet Name="Authors" EntityType ="testModel.Author"/>
+          <EntitySet Name="Publishers" EntityType="testModel.Publisher" />
+          <AssociationSet Name="FK_Books_Authors" Association="testModel.FK_Books_Authors">
+            <End Role="Authors" EntitySet="Authors" />
+            <End Role="Books" EntitySet="Books" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Books_Publishers" Association="testModel.FK_Books_Publishers">
+            <End Role="Publishers" EntitySet="Publishers" />
+            <End Role="Books" EntitySet="Books" />
+          </AssociationSet>
+          <EntitySet Name="DataTypeTests" EntityType="testModel.DataTypeTest"/>
+          <EntitySet Name="Computers" EntityType="testModel.Computer" />
+          <EntitySet Name="Products" EntityType="testModel.Product" />
+        </EntityContainer>
+        
+        <EntityType Name="Employee">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" />
+          <Property Name="LastName" Type="String" Nullable="false" MaxLength="20" />
+          <Property Name="FirstName" Type="String" Nullable="false" MaxLength="10" />
+          <Property Name="Age" Type="Int32" Nullable="true"/>
+        </EntityType>
+
+        <EntityType Name="SalariedEmployee" BaseType ="testModel.Employee">
+          <Property Name="Salary" Type="Int32" Nullable="false"  />
+        </EntityType>
+
+        <EntityType Name="Child">
+          <Key>
+            <PropertyRef Name="Id" />

+          </Key>
+          <Property Name="Id" Type="Int64" Nullable="false" />
+          <Property Name="EmployeeID" Type="Int32" Nullable="false" />
+          <Property Name="LastName" Type="String" Nullable="false" MaxLength="20" />
+          <Property Name="FirstName" Type="String" Nullable="false" MaxLength="10" />
+          <Property Name="BirthTime" Type="Time" Nullable="true"/>
+          <Property Name="BirthWeight" Type="Double" Nullable="true"/>
+          <Property Name="Modified" Type="DateTime" Nullable ="false"/>
+        </EntityType>
+
+        <EntityType Name="Company">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable ="false"/>
+          <Property Name="Name" Type="String" Nullable ="false" MaxLength ="100"/>
+          <Property Name="DateBegan" Type="DateTime" Nullable ="true"/>
+          <Property Name="NumEmployees" Type="Int32" Nullable ="true"/>
+          <Property Name="Address" Type="testModel.CommonAddress" Nullable="false"/>
+          <NavigationProperty Name="Toys" Relationship ="testModel.FK_Toys_Supplier" FromRole ="Supplier" ToRole ="Toys"/>
+        </EntityType>
+
+        <EntityType Name="Toy">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable ="false"/>
+          <Property Name="Name" Type="String" MaxLength="100" Nullable ="false"/>
+          <Property Name="MinAge" Type="Int32" Nullable ="false"/>
+          <NavigationProperty Name="Supplier" Relationship ="testModel.FK_Toys_Supplier" FromRole="Toys" ToRole="Supplier"/>
+        </EntityType>
+
+        <Association Name="FK_Toys_Supplier">
+          <End Role="Supplier" Type="testModel.Company" Multiplicity="1" />
+          <End Role="Toys" Type="testModel.Toy" Multiplicity="*" />
+        </Association>
+
+        <!-- Complex type -->
+        <ComplexType Name="CommonAddress" >
+          <Property Name ="Address" Type="String"  />
+          <Property Name ="City" Type="String" />
+          <Property Name ="State" Type="String" />
+          <Property Name ="ZipCode" Type="String" />
+        </ComplexType>
+
+        <EntityType Name="Store">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable ="false"/>
+          <Property Name="Name" Type="String" MaxLength="50" Nullable ="false"/>
+          <Property Name ="Address" Type="String"  />
+          <Property Name ="City" Type="String" />
+          <Property Name ="State" Type="String" />
+          <Property Name ="ZipCode" Type="String" />
+        </EntityType>
+
+        <EntityType Name="Order">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable ="false"/>
+          <Property Name="Freight" Type="Double" Nullable ="false"/>
+          <NavigationProperty Name="Store" Relationship ="testModel.FK_Orders_Store" FromRole="Orders" ToRole="Store"/>
+        </EntityType>
+
+        <Association Name="FK_Orders_Store">
+          <End Role="Store" Type="testModel.Store" Multiplicity="1" />
+          <End Role="Orders" Type="testModel.Order" Multiplicity="*" />
+        </Association>
+
+        <EntityType Name="Book">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable ="false"/>
+          <Property Name="Name" Type="String" Nullable ="false"/>
+          <Property Name="Pages" Type="Int32" Nullable ="false"/>
+          <NavigationProperty Name="Author" Relationship="testModel.FK_Books_Authors" FromRole="Books" ToRole="Authors" />
+          <NavigationProperty Name="Publisher" Relationship="testModel.FK_Books_Publishers" FromRole="Books" ToRole="Publishers" />
+        </EntityType>
+
+        <EntityType Name="Author">
+          <Key>
+            <PropertyRef Name="Id"/>
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable ="false"/>
+          <Property Name="Name" Type="String" Nullable ="false"/>
+          <Property Name="Age" Type="Int32"/>
+          <NavigationProperty Name="Books" Relationship="testModel.FK_Books_Authors" FromRole="Authors" ToRole="Books" />
+        </EntityType>
+
+        <EntityType Name="Publisher">
+          <Key>
+            <PropertyRef Name="id" />
+          </Key>
+          <Property Name="id" Type="Int32" Nullable="false" />
+          <Property Name="name" Type="String" Nullable="false" MaxLength="20" Unicode="false" FixedLength="false" />
+          <NavigationProperty Name="Books" Relationship="testModel.FK_Books_Publishers" FromRole="Publishers" ToRole="Books" />
+        </EntityType>
+
+        <Association Name="FK_Books_Authors">
+          <End Role="Authors" Type="testModel.Author" Multiplicity="1" />
+          <End Role="Books" Type="testModel.Book" Multiplicity="*" />
+        </Association>
+        <Association Name="FK_Books_Publishers">
+          <End Role="Publishers" Type="testModel.Publisher" Multiplicity="1" />
+          <End Role="Books" Type="testModel.Book" Multiplicity="*" />
+        </Association>
+
+        <EntityType Name="DataTypeTest">
+          <Key>
+            <PropertyRef Name="id"/>
+          </Key>
+          <Property Name="id" Type="Guid" Nullable="false"/>
+          <Property Name="id2" Type="Guid" Nullable ="false"/>
+          <Property Name="idAsChar" Type="String" Nullable="true"/>
+        </EntityType>
+
+        <EntityType Name="Computer" Abstract="true">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Brand" Type="String" Nullable="false" />
+          <Property Name="Id" Type="Int32" Nullable="false" />
+        </EntityType>
+        
+        <EntityType Name="DesktopComputer" BaseType="testModel.Computer">
+          <Property Name="Color" Type="String" />
+        </EntityType>
+        
+        <EntityType Name="LaptopComputer" BaseType="testModel.Computer">
+          <Property Name="IsCertified" Type="Boolean" />
+          <Property Name="Size" Type="String" />
+        </EntityType>
+        
+        <EntityType Name="TabletComputer" BaseType="testModel.Computer">
+          <Property Name="IsAvailable" Type="Boolean" />
+          <Property Name="ReleaseDate" Type="DateTime" />
+        </EntityType>
+
+        <EntityType Name="Product">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Type="Int32" Name="Id" Nullable="false" />
+          <Property Type="String" Name="Name" Nullable="false" />
+          <Property Type="DateTime" Name="CreatedDate" Nullable="false" />
+        </EntityType>
+      </Schema>
+    </edmx:ConceptualModels>
+    <!-- C-S mapping content -->
+    <edmx:Mappings>
+      <Mapping xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS" Space="C-S">
+        <Alias Key="Model" Value="testModel" />
+        <Alias Key="Target" Value="testModel.Store" />
+        <EntityContainerMapping CdmEntityContainer="testEntities" StorageEntityContainer="testContainer">
+
+
+          <!--		<EntitySetMapping Name="Employee">
+			<EntityTypeMapping TypeName="TestDB.Employee">
+				<MappingFragment StoreEntitySet="Employees" >
+					<ScalarProperty Name="Id" ColumnName="Id" />
+					<ScalarProperty Name="LastName" ColumnName="LastName" />
+					<ScalarProperty Name="FirstName" ColumnName="FirstName" />
+				</MappingFragment>
+			</EntityTypeMapping>
+		</EntitySetMapping>-->
+
+          <EntitySetMapping Name="Employees">
+            <!-- 
+      The IsTypeOf keyword tells the mapping that the following mapping applies to all subtypes of 
+      the given Type (in this case, SalariedEmployee as well as Employee)
+      -->
+            <EntityTypeMapping TypeName="IsTypeOf(testModel.Employee)">
+              <MappingFragment StoreEntitySet="Employees" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="LastName" ColumnName="LastName" />
+                <ScalarProperty Name="FirstName" ColumnName="FirstName" />
+                <ScalarProperty Name="Age" ColumnName ="Age"/>
+              </MappingFragment>
+            </EntityTypeMapping>
+
+            <EntityTypeMapping TypeName ="testModel.SalariedEmployee">
+              <MappingFragment StoreEntitySet="SalariedEmployees">
+                <ScalarProperty Name="Id" ColumnName="EmployeeId" />
+                <ScalarProperty Name="Salary" ColumnName="Salary" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Children">
+            <EntityTypeMapping TypeName="testModel.Child">
+              <MappingFragment StoreEntitySet="EmployeeChildren" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="EmployeeID" ColumnName="EmployeeID" />
+                <ScalarProperty Name="LastName" ColumnName="LastName" />
+                <ScalarProperty Name="FirstName" ColumnName="FirstName" />
+                <ScalarProperty Name="BirthTime" ColumnName="BirthTime"/>
+                <ScalarProperty Name="BirthWeight" ColumnName="Weight"/>
+                <ScalarProperty Name="Modified" ColumnName ="LastModified"/>
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Companies" StoreEntitySet ="Companies" TypeName="testModel.Company">
+            <ScalarProperty Name="Id" ColumnName="Id" />
+            <ScalarProperty Name="Name" ColumnName="Name" />
+            <ScalarProperty Name="DateBegan" ColumnName="DateBegan" />
+            <ScalarProperty Name="NumEmployees" ColumnName="NumEmployees" />
+            <ComplexProperty Name ="Address" TypeName ="testModel.CommonAddress" >
+              <ScalarProperty Name="Address" ColumnName="Address" />
+              <ScalarProperty Name="City" ColumnName="City" />
+              <ScalarProperty Name="State" ColumnName="State" />
+              <ScalarProperty Name="ZipCode" ColumnName="ZipCode" />
+            </ComplexProperty >
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Toys">
+            <EntityTypeMapping TypeName="testModel.Toy">
+              <MappingFragment StoreEntitySet="Toys" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="MinAge" ColumnName="MinAge" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <AssociationSetMapping Name="FK_Toys_Supplier" TypeName="testModel.FK_Toys_Supplier" StoreEntitySet="Toys">
+            <EndProperty Name="Supplier">
+              <ScalarProperty Name="Id" ColumnName="SupplierId" />
+            </EndProperty>
+            <EndProperty Name="Toys">
+              <ScalarProperty Name="Id" ColumnName="Id" />
+            </EndProperty>
+          </AssociationSetMapping>
+
+          <EntitySetMapping Name="Stores">
+            <EntityTypeMapping TypeName="testModel.Store">
+              <MappingFragment StoreEntitySet="Stores" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Address" ColumnName="Address" />
+                <ScalarProperty Name="City" ColumnName="City" />
+                <ScalarProperty Name="State" ColumnName="State" />
+                <ScalarProperty Name="ZipCode" ColumnName="ZipCode" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Orders">
+            <EntityTypeMapping TypeName="testModel.Order">
+              <MappingFragment StoreEntitySet="Orders" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="Freight" ColumnName="Freight" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <AssociationSetMapping Name="FK_Orders_Store" TypeName="testModel.FK_Orders_Store" StoreEntitySet="Orders">
+            <EndProperty Name="Store">
+              <ScalarProperty Name="Id" ColumnName="StoreId" />
+            </EndProperty>
+            <EndProperty Name="Orders">
+              <ScalarProperty Name="Id" ColumnName="Id" />
+            </EndProperty>
+            <Condition ColumnName ="StoreId" IsNull ="false"/>
+          </AssociationSetMapping>
+
+          <EntitySetMapping Name="Books">
+            <EntityTypeMapping TypeName="testModel.Book">
+              <MappingFragment StoreEntitySet="Books" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Pages" ColumnName="Pages" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Authors">
+            <EntityTypeMapping TypeName="IsTypeOf(testModel.Author)">
+              <MappingFragment StoreEntitySet="Authors" >
+                <ScalarProperty Name="Id" ColumnName="Id" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Age" ColumnName="Age" />
+              </MappingFragment>
+            </EntityTypeMapping>
+            <EntityTypeMapping TypeName="testModel.Author">
+              <ModificationFunctionMapping>
+                <InsertFunction FunctionName="testModel.Store.AddAuthor">
+                  <ScalarProperty Name="Age" ParameterName="theage" />
+                  <ScalarProperty Name="Name" ParameterName="thename" />
+                  <ScalarProperty Name="Id" ParameterName="theid" />
+                </InsertFunction>
+                <UpdateFunction FunctionName="testModel.Store.UpdateAuthor" >
+                  <ScalarProperty Name="Age" ParameterName="theage" Version="Current" />
+                  <ScalarProperty Name="Name" ParameterName="thename" Version="Current" />
+                  <ScalarProperty Name="Id" ParameterName="theid" Version="Current" />
+                </UpdateFunction>
+                <DeleteFunction FunctionName="testModel.Store.DeleteAuthor" >
+                  <ScalarProperty Name="Id" ParameterName="theid" />
+                </DeleteFunction>
+              </ModificationFunctionMapping>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Publishers">
+            <EntityTypeMapping TypeName="testModel.Publisher">
+              <MappingFragment StoreEntitySet="Publishers">
+                <ScalarProperty Name="id" ColumnName="id" />
+                <ScalarProperty Name="name" ColumnName="name" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <AssociationSetMapping Name="FK_Books_Authors" TypeName="testModel.FK_Books_Authors" StoreEntitySet="Books">
+            <EndProperty Name="Authors">
+              <ScalarProperty Name="Id" ColumnName="Author_id" />
+            </EndProperty>
+            <EndProperty Name="Books">
+              <ScalarProperty Name="Id" ColumnName="Id" />
+            </EndProperty>
+          </AssociationSetMapping>
+
+          <AssociationSetMapping Name="FK_Books_Publishers" TypeName="testModel.FK_Books_Publishers" StoreEntitySet="Books">
+            <EndProperty Name="Publishers">
+              <ScalarProperty Name="id" ColumnName="Publisher_id" />
+            </EndProperty>
+            <EndProperty Name="Books">
+              <ScalarProperty Name="Id" ColumnName="Id" />
+            </EndProperty>
+          </AssociationSetMapping>
+
+          <EntitySetMapping Name="DataTypeTests">
+            <EntityTypeMapping TypeName="testModel.DataTypeTest">
+              <MappingFragment StoreEntitySet="DataTypeTests">
+                <ScalarProperty Name="id" ColumnName="id" />
+                <ScalarProperty Name="id2" ColumnName="id2" />
+                <ScalarProperty Name="idAsChar" ColumnName="idAsChar"/>
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Computers">
+            <EntityTypeMapping TypeName="IsTypeOf(testModel.Computer)">
+              <MappingFragment StoreEntitySet="Computers">
+                <ScalarProperty Name="Brand" ColumnName="Brand" />
+                <ScalarProperty Name="Id" ColumnName="Id" />
+              </MappingFragment>
+            </EntityTypeMapping>
+            <EntityTypeMapping TypeName="IsTypeOf(testModel.DesktopComputer)">
+              <MappingFragment StoreEntitySet="DesktopComputers">
+                <ScalarProperty Name="Id" ColumnName="IdDesktopComputer" />
+                <ScalarProperty Name="Color" ColumnName="Color" />
+              </MappingFragment>
+            </EntityTypeMapping>
+            <EntityTypeMapping TypeName="IsTypeOf(testModel.LaptopComputer)">
+              <MappingFragment StoreEntitySet="LaptopComputers">
+                <ScalarProperty Name="Id" ColumnName="IdLaptopComputer" />
+                <ScalarProperty Name="IsCertified" ColumnName="IsCertified" />
+                <ScalarProperty Name="Size" ColumnName="Size" />
+              </MappingFragment>
+            </EntityTypeMapping>
+            <EntityTypeMapping TypeName="IsTypeOf(testModel.TabletComputer)">
+              <MappingFragment StoreEntitySet="TabletComputers">
+                <ScalarProperty Name="Id" ColumnName="IdTabletComputer" />
+                <ScalarProperty Name="IsAvailable" ColumnName="IsAvailable" />
+                <ScalarProperty Name="ReleaseDate" ColumnName="ReleaseDate" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+
+          <EntitySetMapping Name="Products">
+            <EntityTypeMapping TypeName="testModel.Product">
+              <MappingFragment StoreEntitySet="Products">
+                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Id" ColumnName="Id" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          
+        </EntityContainerMapping>
+      </Mapping>
+    </edmx:Mappings>
+  </edmx:Runtime>
+  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2007/06/edmx">
+    <edmx:Connection>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+      </DesignerInfoPropertySet>
+    </edmx:Connection>
+    <edmx:Options>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="ValidateOnBuild" Value="true" />
+        <DesignerProperty Name="EnablePluralization" Value="True" />
+      </DesignerInfoPropertySet>
+    </edmx:Options>
+    <!-- Diagram content (shape and connector positions) -->
+    <edmx:Diagrams>
+      <Diagram Name="TestModel" />
+    </edmx:Diagrams>
+  </edmx:Designer>
+</edmx:Edmx>

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into connector-net-6.4 branch (julio.casal:1009) Julio Casal23 Jun