// ------------------------------------------------------------------------------
// 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: 8/13/2012 10:51:00 AM
//    DevForce version: 6.1.9.0
//    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("Al6epZaQgUO/JoSr0Soy65emT20a1cuHt3+vxUdcnjRmI9M0Ef/NxSXxxlasMvKm")]

namespace IdeaBladeMVC.Data { 

  #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<Employee> Employees {
      get { return new IbEm.EntityQuery<Employee>("Employees", 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); }
    }

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

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

    /// <summary>Gets the <see cref="T:IbEm.EntityQuery"/> associated with the given EntitySet name. </summary>
    public IbEm.EntityQuery<Supplier> Suppliers {
      get { return new IbEm.EntityQuery<Supplier>("Suppliers", 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 Employee class

  /// <summary>The auto-generated Employee class. </summary>
  [DataContract(IsReference=true)]
  [IbEm.DataSourceKeyName(@"NorthwindIBEntities")]
  [IbEm.DefaultEntitySetName(@"NorthwindIBEntities.Employees")]
  public partial class Employee : 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<Employee, object>> expr) {
      return IbCore.PropertyPath.For<Employee>(expr);
    }

    #region Data Properties

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

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

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

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

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

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

    /// <summary>Gets or sets the HireDate. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="HireDate", AutoGenerateField=true)]
    public System.Nullable<System.DateTime> HireDate {
      get { return PropertyMetadata.HireDate.GetValue(this); }
      set { PropertyMetadata.HireDate.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="Employee_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="Employee_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="Employee_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="Employee_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="Employee_Country")]
    public string Country {
      get { return PropertyMetadata.Country.GetValue(this); }
      set { PropertyMetadata.Country.SetValue(this, value); }
    }

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

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

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

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

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

    /// <summary>Gets or sets the ReportsToEmployeeID. </summary>
    [DataMember]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="ReportsToEmployeeID", AutoGenerateField=false)]
    public System.Nullable<int> ReportsToEmployeeID {
      get { return PropertyMetadata.ReportsToEmployeeID.GetValue(this); }
      set { PropertyMetadata.ReportsToEmployeeID.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="Employee_RowVersion")]
    public int RowVersion {
      get { return PropertyMetadata.RowVersion.GetValue(this); }
      set { PropertyMetadata.RowVersion.SetValue(this, value); }
    }
    #endregion Data Properties

    #region Navigation properties

    /// <summary>Gets the Employee1. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="Employee1", AutoGenerateField=false)]
    public IbEm.RelatedEntityList<Employee> Employee1 {
      get { return PropertyMetadata.Employee1.GetValue(this); }
    }

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

    /// <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 EmployeeID <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Employee, int> EmployeeID = new IbEm.DataEntityProperty<Employee, int>("EmployeeID", false, true, IbEm.ConcurrencyStrategy.None, true, null);

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

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

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

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

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

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

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

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

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

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

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

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

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

      /// <summary>The Photo <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Employee, byte[]> Photo = new IbEm.DataEntityProperty<Employee, byte[]>("Photo", true, false, IbEm.ConcurrencyStrategy.None, false, null);

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

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

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

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

      /// <summary>The Employee1 <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationListEntityProperty<Employee, Employee> Employee1 = new IbEm.NavigationListEntityProperty<Employee, Employee>("Employee1", true, "FK_Employee_Employee", IbEm.QueryDirection.ToRole1);

      /// <summary>The Employee2 <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationScalarEntityProperty<Employee, Employee> Employee2 = new IbEm.NavigationScalarEntityProperty<Employee, Employee>("Employee2", true, "FK_Employee_Employee", IbEm.QueryDirection.ToRole2);

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

    #region EntityPropertyNames
    public new partial class EntityPropertyNames : IbEm.Entity.EntityPropertyNames {
      public const String EmployeeID = "EmployeeID";
      public const String LastName = "LastName";
      public const String FirstName = "FirstName";
      public const String Title = "Title";
      public const String TitleOfCourtesy = "TitleOfCourtesy";
      public const String BirthDate = "BirthDate";
      public const String HireDate = "HireDate";
      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 HomePhone = "HomePhone";
      public const String Extension = "Extension";
      public const String Photo = "Photo";
      public const String Notes = "Notes";
      public const String PhotoPath = "PhotoPath";
      public const String ReportsToEmployeeID = "ReportsToEmployeeID";
      public const String RowVersion = "RowVersion";
      public const String Employee1 = "Employee1";
      public const String Employee2 = "Employee2";
      public const String Orders = "Orders";
    }
    #endregion EntityPropertyNames
  }
  #endregion Employee 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(false)]
    [Editable(true)]
    [Display(Name="EmployeeID", AutoGenerateField=false)]
    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); }
    }

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

    /// <summary>Gets the OrderDetails. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="OrderDetails", AutoGenerateField=false)]
    public IbEm.RelatedEntityList<OrderDetail> OrderDetails {
      get { return PropertyMetadata.OrderDetails.GetValue(this); }
    }
    #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, "Employee");

      /// <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);

      /// <summary>The Employee <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationScalarEntityProperty<Order, Employee> Employee = new IbEm.NavigationScalarEntityProperty<Order, Employee>("Employee", true, "FK_Order_Employee", IbEm.QueryDirection.ToRole2);

      /// <summary>The OrderDetails <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationListEntityProperty<Order, OrderDetail> OrderDetails = new IbEm.NavigationListEntityProperty<Order, OrderDetail>("OrderDetails", true, "FK_OrderDetail_Order", IbEm.QueryDirection.ToRole1);
    }
    #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";
      public const String Employee = "Employee";
      public const String OrderDetails = "OrderDetails";
    }
    #endregion EntityPropertyNames
  }
  #endregion Order class

  #region OrderDetail class

  /// <summary>The auto-generated OrderDetail class. </summary>
  [DataContract(IsReference=true)]
  [IbEm.DataSourceKeyName(@"NorthwindIBEntities")]
  [IbEm.DefaultEntitySetName(@"NorthwindIBEntities.OrderDetails")]
  public partial class OrderDetail : 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<OrderDetail, object>> expr) {
      return IbCore.PropertyPath.For<OrderDetail>(expr);
    }

    #region Data Properties

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

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

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

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

    /// <summary>Gets or sets the Discount. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="Discount", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="OrderDetail_Discount")]
    public float Discount {
      get { return PropertyMetadata.Discount.GetValue(this); }
      set { PropertyMetadata.Discount.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="OrderDetail_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 Order. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="Order", AutoGenerateField=false)]
    public Order Order {
      get { return PropertyMetadata.Order.GetValue(this); }
      set { PropertyMetadata.Order.SetValue(this, value); }
    }

    /// <summary>Gets or sets the Product. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="Product", AutoGenerateField=false)]
    public Product Product {
      get { return PropertyMetadata.Product.GetValue(this); }
      set { PropertyMetadata.Product.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<OrderDetail, int> OrderID = new IbEm.DataEntityProperty<OrderDetail, int>("OrderID", false, true, IbEm.ConcurrencyStrategy.None, false, "Order");

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

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

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

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

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

      /// <summary>The Order <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationScalarEntityProperty<OrderDetail, Order> Order = new IbEm.NavigationScalarEntityProperty<OrderDetail, Order>("Order", true, "FK_OrderDetail_Order", IbEm.QueryDirection.ToRole2);

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

    #region EntityPropertyNames
    public new partial class EntityPropertyNames : IbEm.Entity.EntityPropertyNames {
      public const String OrderID = "OrderID";
      public const String ProductID = "ProductID";
      public const String UnitPrice = "UnitPrice";
      public const String Quantity = "Quantity";
      public const String Discount = "Discount";
      public const String RowVersion = "RowVersion";
      public const String Order = "Order";
      public const String Product = "Product";
    }
    #endregion EntityPropertyNames
  }
  #endregion OrderDetail class

  #region Product class

  /// <summary>The auto-generated Product class. </summary>
  [DataContract(IsReference=true)]
  [IbEm.DataSourceKeyName(@"NorthwindIBEntities")]
  [IbEm.DefaultEntitySetName(@"NorthwindIBEntities.Products")]
  public partial class Product : 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<Product, object>> expr) {
      return IbCore.PropertyPath.For<Product>(expr);
    }

    #region Data Properties

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

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

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

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

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

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

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

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

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

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

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

    #region Navigation properties

    /// <summary>Gets the OrderDetails. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="OrderDetails", AutoGenerateField=false)]
    public IbEm.RelatedEntityList<OrderDetail> OrderDetails {
      get { return PropertyMetadata.OrderDetails.GetValue(this); }
    }

    /// <summary>Gets or sets the Supplier. </summary>
    [DataMember]
    [Bindable(false)]
    [Display(Name="Supplier", AutoGenerateField=false)]
    public Supplier Supplier {
      get { return PropertyMetadata.Supplier.GetValue(this); }
      set { PropertyMetadata.Supplier.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 ProductID <see cref="T:IbEm.DataEntityProperty"/>. </summary>
      public static readonly IbEm.DataEntityProperty<Product, int> ProductID = new IbEm.DataEntityProperty<Product, int>("ProductID", false, true, IbEm.ConcurrencyStrategy.None, true, null);

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

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

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

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

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

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

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

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

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

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

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

      /// <summary>The OrderDetails <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationListEntityProperty<Product, OrderDetail> OrderDetails = new IbEm.NavigationListEntityProperty<Product, OrderDetail>("OrderDetails", true, "FK_OrderDetail_Product", IbEm.QueryDirection.ToRole1);

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

    #region EntityPropertyNames
    public new partial class EntityPropertyNames : IbEm.Entity.EntityPropertyNames {
      public const String ProductID = "ProductID";
      public const String ProductName = "ProductName";
      public const String SupplierID = "SupplierID";
      public const String CategoryID = "CategoryID";
      public const String QuantityPerUnit = "QuantityPerUnit";
      public const String UnitPrice = "UnitPrice";
      public const String UnitsInStock = "UnitsInStock";
      public const String UnitsOnOrder = "UnitsOnOrder";
      public const String ReorderLevel = "ReorderLevel";
      public const String Discontinued = "Discontinued";
      public const String DiscontinuedDate = "DiscontinuedDate";
      public const String RowVersion = "RowVersion";
      public const String OrderDetails = "OrderDetails";
      public const String Supplier = "Supplier";
    }
    #endregion EntityPropertyNames
  }
  #endregion Product class

  #region Supplier class

  /// <summary>The auto-generated Supplier class. </summary>
  [DataContract(IsReference=true)]
  [IbEm.DataSourceKeyName(@"NorthwindIBEntities")]
  [IbEm.DefaultEntitySetName(@"NorthwindIBEntities.Suppliers")]
  public partial class Supplier : 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<Supplier, object>> expr) {
      return IbCore.PropertyPath.For<Supplier>(expr);
    }

    #region Data Properties

    /// <summary>Gets or sets the SupplierID. </summary>
    [Key]
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="SupplierID", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="Supplier_SupplierID")]
    public int SupplierID {
      get { return PropertyMetadata.SupplierID.GetValue(this); }
      set { PropertyMetadata.SupplierID.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="Supplier_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="Supplier_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="Supplier_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="Supplier_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="Supplier_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="Supplier_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="Supplier_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="Supplier_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="Supplier_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="Supplier_Fax")]
    public string Fax {
      get { return PropertyMetadata.Fax.GetValue(this); }
      set { PropertyMetadata.Fax.SetValue(this, value); }
    }

    /// <summary>Gets or sets the HomePage. </summary>
    [DataMember]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="HomePage", AutoGenerateField=true)]
    public string HomePage {
      get { return PropertyMetadata.HomePage.GetValue(this); }
      set { PropertyMetadata.HomePage.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="Supplier_RowVersion")]
    public int RowVersion {
      get { return PropertyMetadata.RowVersion.GetValue(this); }
      set { PropertyMetadata.RowVersion.SetValue(this, value); }
    }
    #endregion Data Properties

    #region Navigation properties

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

    #region EntityProperty definitions
    public partial class PropertyMetadata {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /// <summary>The Products <see cref="T:IbEm.NavigationEntityProperty"/>. </summary>
      public static readonly IbEm.NavigationListEntityProperty<Supplier, Product> Products = new IbEm.NavigationListEntityProperty<Supplier, Product>("Products", true, "FK_Product_Supplier", IbEm.QueryDirection.ToRole1);
    }
    #endregion EntityProperty definitions

    #region EntityPropertyNames
    public new partial class EntityPropertyNames : IbEm.Entity.EntityPropertyNames {
      public const String SupplierID = "SupplierID";
      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 HomePage = "HomePage";
      public const String RowVersion = "RowVersion";
      public const String Products = "Products";
    }
    #endregion EntityPropertyNames
  }
  #endregion Supplier class

  #region EntityRelations

  /// <summary>
  /// A generated class that returns the relations between entities in this model.
  /// </summary>
  [IbCore.IdeaBladeGuid("00936ece-a735-41e9-852a-425cdc0164c0", "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");

    /// <summary>
    /// Represents the relationship between 
    /// <see cref="Employee"/> and <see cref="Employee"/>.
    /// </summary>
    public static IbEm.EntityRelation FK_Employee_Employee = new IbEm.EntityRelation(
      typeof(Employee),
      typeof(Employee),
       new IbEm.DataEntityProperty[] { Employee.PropertyMetadata.ReportsToEmployeeID},
       new IbEm.DataEntityProperty[] { Employee.PropertyMetadata.EmployeeID},
      IbEm.Multiplicity.Many,
      IbEm.Multiplicity.ZeroOrOne,
      IbEm.OnDeleteMode.None,
      IbEm.OnDeleteMode.None,
      "FK_Employee_Employee");

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

    /// <summary>
    /// Represents the relationship between 
    /// <see cref="OrderDetail"/> and <see cref="Order"/>.
    /// </summary>
    public static IbEm.EntityRelation FK_OrderDetail_Order = new IbEm.EntityRelation(
      typeof(OrderDetail),
      typeof(Order),
       new IbEm.DataEntityProperty[] { OrderDetail.PropertyMetadata.OrderID},
       new IbEm.DataEntityProperty[] { Order.PropertyMetadata.OrderID},
      IbEm.Multiplicity.Many,
      IbEm.Multiplicity.One,
      IbEm.OnDeleteMode.None,
      IbEm.OnDeleteMode.None,
      "FK_OrderDetail_Order");

    /// <summary>
    /// Represents the relationship between 
    /// <see cref="OrderDetail"/> and <see cref="Product"/>.
    /// </summary>
    public static IbEm.EntityRelation FK_OrderDetail_Product = new IbEm.EntityRelation(
      typeof(OrderDetail),
      typeof(Product),
       new IbEm.DataEntityProperty[] { OrderDetail.PropertyMetadata.ProductID},
       new IbEm.DataEntityProperty[] { Product.PropertyMetadata.ProductID},
      IbEm.Multiplicity.Many,
      IbEm.Multiplicity.One,
      IbEm.OnDeleteMode.None,
      IbEm.OnDeleteMode.None,
      "FK_OrderDetail_Product");

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