// ------------------------------------------------------------------------------
// DO NOT MODIFY THIS CLASS - AutoGenerated Code
//    Any changes made to this code will be lost the next time this 
//    code is regenerated.
// 
//    Generated at: 9/4/2012 1:46:57 PM
//    DevForce version: 6.1.8.1
//    Template version: 2.1.4
// ------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using IbEm   = IdeaBlade.EntityModel;
using IbCore = IdeaBlade.Core;
using IbVal  = IdeaBlade.Validation;

[module: IbCore.IdeaBladeLicense("Ajy8yZeOB9G12aZWQQ1S0soq9HPnMs0OFCmmD+X5lRm5BYl9xC1w9O7t4glzkKtR")]

namespace MvvmLightDemo { 

  #region NorthwindIBEntities

  /// <summary>
  /// The domain-specific EntityManager for your domain model.
  /// </summary>
  public partial class NorthwindIBEntities : IbEm.EntityManager {

    #region Constructors

    /// <summary>See <see cref="M:IbEm.EntityManager.#ctor(bool, string, IbEm.EntityServiceOption, string)"/>. </summary>
    public NorthwindIBEntities(bool shouldConnect=true, string dataSourceExtension=null, IbEm.EntityServiceOption entityServiceOption=IbEm.EntityServiceOption.UseDefaultService, string compositionContextName=null) : base(shouldConnect, dataSourceExtension, entityServiceOption, compositionContextName) {}

    /// <summary>See <see cref="M:IbEm.EntityManager.#ctor(IbEm.EntityManagerContext)"/>. </summary>
    public NorthwindIBEntities(IbEm.EntityManagerContext entityManagerContext) : base(entityManagerContext) {}

    /// <summary>See <see cref="M:IbEm.EntityManager.#ctor(IbEm.EntityManager, bool, string, IbEm.EntityServiceOption, string)"/>. </summary>
    public NorthwindIBEntities(IbEm.EntityManager entityManager, bool shouldConnect, string dataSourceExtension=null, IbEm.EntityServiceOption entityServiceOption=IbEm.EntityServiceOption.UseDefaultService, string compositionContextName=null) : base(entityManager, shouldConnect, dataSourceExtension, entityServiceOption, compositionContextName) {}

    /// <summary>See <see cref="M:IbEm.EntityManager.#ctor(IbEm.EntityManager, IbEm.EntityManagerContext)"/>. </summary>
    public NorthwindIBEntities(IbEm.EntityManager entityManager, IbEm.EntityManagerContext entityManagerContext=null) : base(entityManager, entityManagerContext) {}

    static NorthwindIBEntities() {
      IbEm.EntityRelation.InitializeEntityRelations(System.Reflection.Assembly.GetExecutingAssembly());
    }
    #endregion Constructors

    #region EntityQueries

    /// <summary>Gets the <see cref="T:IbEm.EntityQuery"/> associated with the given EntitySet name. </summary>
    public IbEm.EntityQuery<Customer> Customers {
      get { return new IbEm.EntityQuery<Customer>("Customers", this); }
    }

    /// <summary>Gets the <see cref="T:IbEm.EntityQuery"/> associated with the given EntitySet name. </summary>
    public IbEm.EntityQuery<Order> Orders {
      get { return new IbEm.EntityQuery<Order>("Orders", this); }
    }
    #endregion EntityQueries
  }
  #endregion NorthwindIBEntities

  #region Customer class

  /// <summary>The auto-generated Customer class. </summary>
  [DataContract(IsReference=true)]
  [IbEm.DataSourceKeyName(@"NorthwindIBEntities")]
  [IbEm.DefaultEntitySetName(@"NorthwindIBEntities.Customers")]
  public partial class Customer : IbEm.Entity {

    /// <summary>Returns the property path for the given expression. </summary>
    /// <example>
    /// Usage:
    /// <code>
    ///    var r = Employee.PathFor(e => e.Manager.City); // returns "Manager.City"
    /// </code>
    /// </example>
    public static string PathFor(System.Linq.Expressions.Expression<System.Func<Customer, object>> expr) {
      return IbCore.PropertyPath.For<Customer>(expr);
    }

    #region Data Properties

    /// <summary>Gets or sets the CustomerID. </summary>
    [Key]
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="CustomerID", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="Customer_CustomerID")]
    public System.Guid CustomerID {
      get { return PropertyMetadata.CustomerID.GetValue(this); }
      set { PropertyMetadata.CustomerID.SetValue(this, value); }
    }

    /// <summary>Gets or sets the CustomerID_OLD. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="CustomerID_OLD", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=5, IsRequired=false, ErrorMessageResourceName="Customer_CustomerID_OLD")]
    public string CustomerID_OLD {
      get { return PropertyMetadata.CustomerID_OLD.GetValue(this); }
      set { PropertyMetadata.CustomerID_OLD.SetValue(this, value); }
    }

    /// <summary>Gets or sets the CompanyName. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="CompanyName", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=40, IsRequired=true, ErrorMessageResourceName="Customer_CompanyName")]
    public string CompanyName {
      get { return PropertyMetadata.CompanyName.GetValue(this); }
      set { PropertyMetadata.CompanyName.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ContactName. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ContactName", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=30, IsRequired=false, ErrorMessageResourceName="Customer_ContactName")]
    public string ContactName {
      get { return PropertyMetadata.ContactName.GetValue(this); }
      set { PropertyMetadata.ContactName.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ContactTitle. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ContactTitle", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=30, IsRequired=false, ErrorMessageResourceName="Customer_ContactTitle")]
    public string ContactTitle {
      get { return PropertyMetadata.ContactTitle.GetValue(this); }
      set { PropertyMetadata.ContactTitle.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Address. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Address", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=60, IsRequired=false, ErrorMessageResourceName="Customer_Address")]
    public string Address {
      get { return PropertyMetadata.Address.GetValue(this); }
      set { PropertyMetadata.Address.SetValue(this, value); }
    }

    /// <summary>Gets or sets the City. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="City", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=15, IsRequired=false, ErrorMessageResourceName="Customer_City")]
    public string City {
      get { return PropertyMetadata.City.GetValue(this); }
      set { PropertyMetadata.City.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Region. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Region", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=15, IsRequired=false, ErrorMessageResourceName="Customer_Region")]
    public string Region {
      get { return PropertyMetadata.Region.GetValue(this); }
      set { PropertyMetadata.Region.SetValue(this, value); }
    }

    /// <summary>Gets or sets the PostalCode. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="PostalCode", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=10, IsRequired=false, ErrorMessageResourceName="Customer_PostalCode")]
    public string PostalCode {
      get { return PropertyMetadata.PostalCode.GetValue(this); }
      set { PropertyMetadata.PostalCode.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Country. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Country", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=15, IsRequired=false, ErrorMessageResourceName="Customer_Country")]
    public string Country {
      get { return PropertyMetadata.Country.GetValue(this); }
      set { PropertyMetadata.Country.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Phone. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Phone", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=24, IsRequired=false, ErrorMessageResourceName="Customer_Phone")]
    public string Phone {
      get { return PropertyMetadata.Phone.GetValue(this); }
      set { PropertyMetadata.Phone.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Fax. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Fax", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=24, IsRequired=false, ErrorMessageResourceName="Customer_Fax")]
    public string Fax {
      get { return PropertyMetadata.Fax.GetValue(this); }
      set { PropertyMetadata.Fax.SetValue(this, value); }
    }

    /// <summary>Gets or sets the RowVersion. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="RowVersion", AutoGenerateField=true)]
    public System.Nullable<int> RowVersion {
      get { return PropertyMetadata.RowVersion.GetValue(this); }
      set { PropertyMetadata.RowVersion.SetValue(this, value); }
    }
    #endregion Data Properties

    #region Navigation properties

    /// <summary>Gets the Orders. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="Orders", AutoGenerateField=false)]
    public IbEm.RelatedEntityList<Order> Orders {
      get { return PropertyMetadata.Orders.GetValue(this); }
    }
    #endregion Navigation properties

    #region EntityProperty definitions
    public partial class PropertyMetadata {

      /// Explicit static constructor ensures static fields are initialized.
      static PropertyMetadata() {}

      /// <summary>The CustomerID <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, System.Guid> CustomerID = new IbEm.DataEntityProperty<Customer, System.Guid>("CustomerID", false, true, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The CustomerID_OLD <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> CustomerID_OLD = new IbEm.DataEntityProperty<Customer, string>("CustomerID_OLD", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The CompanyName <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> CompanyName = new IbEm.DataEntityProperty<Customer, string>("CompanyName", false, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ContactName <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> ContactName = new IbEm.DataEntityProperty<Customer, string>("ContactName", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ContactTitle <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> ContactTitle = new IbEm.DataEntityProperty<Customer, string>("ContactTitle", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Address <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> Address = new IbEm.DataEntityProperty<Customer, string>("Address", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The City <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> City = new IbEm.DataEntityProperty<Customer, string>("City", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Region <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> Region = new IbEm.DataEntityProperty<Customer, string>("Region", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The PostalCode <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> PostalCode = new IbEm.DataEntityProperty<Customer, string>("PostalCode", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Country <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> Country = new IbEm.DataEntityProperty<Customer, string>("Country", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Phone <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> Phone = new IbEm.DataEntityProperty<Customer, string>("Phone", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Fax <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, string> Fax = new IbEm.DataEntityProperty<Customer, string>("Fax", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The RowVersion <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Customer, System.Nullable<int>> RowVersion = new IbEm.DataEntityProperty<Customer, System.Nullable<int>>("RowVersion", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Orders <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationListEntityProperty<Customer, Order> Orders = new IbEm.NavigationListEntityProperty<Customer, Order>("Orders", true, "FK_Order_Customer", IbEm.QueryDirection.ToRole1);
    }
    #endregion EntityProperty definitions

    #region EntityPropertyNames
    public new partial class EntityPropertyNames : IbEm.Entity.EntityPropertyNames {
      public const String CustomerID = "CustomerID";
      public const String CustomerID_OLD = "CustomerID_OLD";
      public const String CompanyName = "CompanyName";
      public const String ContactName = "ContactName";
      public const String ContactTitle = "ContactTitle";
      public const String Address = "Address";
      public const String City = "City";
      public const String Region = "Region";
      public const String PostalCode = "PostalCode";
      public const String Country = "Country";
      public const String Phone = "Phone";
      public const String Fax = "Fax";
      public const String RowVersion = "RowVersion";
      public const String Orders = "Orders";
    }
    #endregion EntityPropertyNames
  }
  #endregion Customer class

  #region Order class

  /// <summary>The auto-generated Order class. </summary>
  [DataContract(IsReference=true)]
  [IbEm.DataSourceKeyName(@"NorthwindIBEntities")]
  [IbEm.DefaultEntitySetName(@"NorthwindIBEntities.Orders")]
  public partial class Order : IbEm.Entity {

    /// <summary>Returns the property path for the given expression. </summary>
    /// <example>
    /// Usage:
    /// <code>
    ///    var r = Employee.PathFor(e => e.Manager.City); // returns "Manager.City"
    /// </code>
    /// </example>
    public static string PathFor(System.Linq.Expressions.Expression<System.Func<Order, object>> expr) {
      return IbCore.PropertyPath.For<Order>(expr);
    }

    #region Data Properties

    /// <summary>Gets or sets the OrderID. </summary>
    [Key]
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="OrderID", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="Order_OrderID")]
    public int OrderID {
      get { return PropertyMetadata.OrderID.GetValue(this); }
      set { PropertyMetadata.OrderID.SetValue(this, value); }
    }

    /// <summary>Gets or sets the CustomerID. </summary>
    [DataMember]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="CustomerID", AutoGenerateField=false)]
    public System.Nullable<System.Guid> CustomerID {
      get { return PropertyMetadata.CustomerID.GetValue(this); }
      set { PropertyMetadata.CustomerID.SetValue(this, value); }
    }

    /// <summary>Gets or sets the EmployeeID. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="EmployeeID", AutoGenerateField=true)]
    public System.Nullable<int> EmployeeID {
      get { return PropertyMetadata.EmployeeID.GetValue(this); }
      set { PropertyMetadata.EmployeeID.SetValue(this, value); }
    }

    /// <summary>Gets or sets the OrderDate. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="OrderDate", AutoGenerateField=true)]
    public System.Nullable<System.DateTime> OrderDate {
      get { return PropertyMetadata.OrderDate.GetValue(this); }
      set { PropertyMetadata.OrderDate.SetValue(this, value); }
    }

    /// <summary>Gets or sets the RequiredDate. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="RequiredDate", AutoGenerateField=true)]
    public System.Nullable<System.DateTime> RequiredDate {
      get { return PropertyMetadata.RequiredDate.GetValue(this); }
      set { PropertyMetadata.RequiredDate.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShippedDate. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShippedDate", AutoGenerateField=true)]
    public System.Nullable<System.DateTime> ShippedDate {
      get { return PropertyMetadata.ShippedDate.GetValue(this); }
      set { PropertyMetadata.ShippedDate.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Freight. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Freight", AutoGenerateField=true)]
    public System.Nullable<decimal> Freight {
      get { return PropertyMetadata.Freight.GetValue(this); }
      set { PropertyMetadata.Freight.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShipName. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShipName", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=40, IsRequired=false, ErrorMessageResourceName="Order_ShipName")]
    public string ShipName {
      get { return PropertyMetadata.ShipName.GetValue(this); }
      set { PropertyMetadata.ShipName.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShipAddress. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShipAddress", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=60, IsRequired=false, ErrorMessageResourceName="Order_ShipAddress")]
    public string ShipAddress {
      get { return PropertyMetadata.ShipAddress.GetValue(this); }
      set { PropertyMetadata.ShipAddress.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShipCity. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShipCity", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=15, IsRequired=false, ErrorMessageResourceName="Order_ShipCity")]
    public string ShipCity {
      get { return PropertyMetadata.ShipCity.GetValue(this); }
      set { PropertyMetadata.ShipCity.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShipRegion. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShipRegion", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=15, IsRequired=false, ErrorMessageResourceName="Order_ShipRegion")]
    public string ShipRegion {
      get { return PropertyMetadata.ShipRegion.GetValue(this); }
      set { PropertyMetadata.ShipRegion.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShipPostalCode. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShipPostalCode", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=10, IsRequired=false, ErrorMessageResourceName="Order_ShipPostalCode")]
    public string ShipPostalCode {
      get { return PropertyMetadata.ShipPostalCode.GetValue(this); }
      set { PropertyMetadata.ShipPostalCode.SetValue(this, value); }
    }

    /// <summary>Gets or sets the ShipCountry. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="ShipCountry", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=15, IsRequired=false, ErrorMessageResourceName="Order_ShipCountry")]
    public string ShipCountry {
      get { return PropertyMetadata.ShipCountry.GetValue(this); }
      set { PropertyMetadata.ShipCountry.SetValue(this, value); }
    }

    /// <summary>Gets or sets the RowVersion. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="RowVersion", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="Order_RowVersion")]
    public int RowVersion {
      get { return PropertyMetadata.RowVersion.GetValue(this); }
      set { PropertyMetadata.RowVersion.SetValue(this, value); }
    }
    #endregion Data Properties

    #region Navigation properties

    /// <summary>Gets or sets the Customer. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="Customer", AutoGenerateField=false)]
    public Customer Customer {
      get { return PropertyMetadata.Customer.GetValue(this); }
      set { PropertyMetadata.Customer.SetValue(this, value); }
    }
    #endregion Navigation properties

    #region EntityProperty definitions
    public partial class PropertyMetadata {

      /// Explicit static constructor ensures static fields are initialized.
      static PropertyMetadata() {}

      /// <summary>The OrderID <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, int> OrderID = new IbEm.DataEntityProperty<Order, int>("OrderID", false, true, IbEm.ConcurrencyStrategy.None, true, null);

      /// <summary>The CustomerID <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, System.Nullable<System.Guid>> CustomerID = new IbEm.DataEntityProperty<Order, System.Nullable<System.Guid>>("CustomerID", true, false, IbEm.ConcurrencyStrategy.None, false, "Customer");

      /// <summary>The EmployeeID <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, System.Nullable<int>> EmployeeID = new IbEm.DataEntityProperty<Order, System.Nullable<int>>("EmployeeID", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The OrderDate <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, System.Nullable<System.DateTime>> OrderDate = new IbEm.DataEntityProperty<Order, System.Nullable<System.DateTime>>("OrderDate", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The RequiredDate <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, System.Nullable<System.DateTime>> RequiredDate = new IbEm.DataEntityProperty<Order, System.Nullable<System.DateTime>>("RequiredDate", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShippedDate <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, System.Nullable<System.DateTime>> ShippedDate = new IbEm.DataEntityProperty<Order, System.Nullable<System.DateTime>>("ShippedDate", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Freight <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, System.Nullable<decimal>> Freight = new IbEm.DataEntityProperty<Order, System.Nullable<decimal>>("Freight", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShipName <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, string> ShipName = new IbEm.DataEntityProperty<Order, string>("ShipName", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShipAddress <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, string> ShipAddress = new IbEm.DataEntityProperty<Order, string>("ShipAddress", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShipCity <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, string> ShipCity = new IbEm.DataEntityProperty<Order, string>("ShipCity", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShipRegion <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, string> ShipRegion = new IbEm.DataEntityProperty<Order, string>("ShipRegion", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShipPostalCode <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, string> ShipPostalCode = new IbEm.DataEntityProperty<Order, string>("ShipPostalCode", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The ShipCountry <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, string> ShipCountry = new IbEm.DataEntityProperty<Order, string>("ShipCountry", true, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The RowVersion <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Order, int> RowVersion = new IbEm.DataEntityProperty<Order, int>("RowVersion", false, false, IbEm.ConcurrencyStrategy.None, false, null);

      /// <summary>The Customer <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationScalarEntityProperty<Order, Customer> Customer = new IbEm.NavigationScalarEntityProperty<Order, Customer>("Customer", true, "FK_Order_Customer", IbEm.QueryDirection.ToRole2);
    }
    #endregion EntityProperty definitions

    #region EntityPropertyNames
    public new partial class EntityPropertyNames : IbEm.Entity.EntityPropertyNames {
      public const String OrderID = "OrderID";
      public const String CustomerID = "CustomerID";
      public const String EmployeeID = "EmployeeID";
      public const String OrderDate = "OrderDate";
      public const String RequiredDate = "RequiredDate";
      public const String ShippedDate = "ShippedDate";
      public const String Freight = "Freight";
      public const String ShipName = "ShipName";
      public const String ShipAddress = "ShipAddress";
      public const String ShipCity = "ShipCity";
      public const String ShipRegion = "ShipRegion";
      public const String ShipPostalCode = "ShipPostalCode";
      public const String ShipCountry = "ShipCountry";
      public const String RowVersion = "RowVersion";
      public const String Customer = "Customer";
    }
    #endregion EntityPropertyNames
  }
  #endregion Order class

  #region EntityRelations

  /// <summary>
  /// A generated class that returns the relations between entities in this model.
  /// </summary>
  [IbCore.IdeaBladeGuid("08adf130-6a9f-4a95-883b-8abc52c018eb", "2.1.4")]
  public partial class EntityRelations : IbEm.IEntityRelations {

    /// Explicit static constructor ensures static fields are initialized.
    static EntityRelations() {}

    /// <summary>
    /// Represents the relationship between 
    /// <see cref="Order"/> and <see cref="Customer"/>.
    /// </summary>
    public static IbEm.EntityRelation FK_Order_Customer = new IbEm.EntityRelation(
      typeof(Order),
      typeof(Customer),
       new IbEm.DataEntityProperty[] { Order.PropertyMetadata.CustomerID},
       new IbEm.DataEntityProperty[] { Customer.PropertyMetadata.CustomerID},
      IbEm.Multiplicity.Many,
      IbEm.Multiplicity.ZeroOrOne,
      IbEm.OnDeleteMode.None,
      IbEm.OnDeleteMode.None,
      "FK_Order_Customer");
  }
  #endregion EntityRelations
}
