mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
class/System.Data.Linq/examples/**/*: Sync with DbLinq r1293. This adds SchemaLoader support for Microsoft SQL Server, allowing sqlmetal to generate entity stubs against SQL Server databases. * class/System.Data.Linq/System.Data.Linq.dll.sources: Add files to the build. * tools/sqlmetal/sqlmetal.exe.config: Add provider entry for SQL Server. * tools/sqlmetal/sqlmetal.exe.sources: Add additional files. svn path=/trunk/mcs/; revision=147868
2655 lines
49 KiB
C#
2655 lines
49 KiB
C#
#region Auto-generated classes for "Northwind;Port=A37" database on 2009-10-28 17:00:08Z
|
|
|
|
//
|
|
// ____ _ __ __ _ _
|
|
// | _ \| |__ | \/ | ___| |_ __ _| |
|
|
// | | | | '_ \| |\/| |/ _ \ __/ _` | |
|
|
// | |_| | |_) | | | | __/ || (_| | |
|
|
// |____/|_.__/|_| |_|\___|\__\__,_|_|
|
|
//
|
|
// Auto-generated from "Northwind" on 2009-10-28 17:00:08Z
|
|
// Please visit http://linq.to/db for more information
|
|
|
|
#endregion
|
|
|
|
using System;
|
|
using System.Data;
|
|
using System.Data.Linq.Mapping;
|
|
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using DbLinq.Data.Linq;
|
|
using DbLinq.Vendor;
|
|
|
|
namespace nwind
|
|
{
|
|
public partial class Northwind : DataContext
|
|
{
|
|
public Northwind(IDbConnection connection)
|
|
: base(connection, new DbLinq.Ingres.IngresVendor())
|
|
{
|
|
}
|
|
|
|
public Northwind(IDbConnection connection, IVendor vendor)
|
|
: base(connection, vendor)
|
|
{
|
|
}
|
|
|
|
public Northwind(string connectionString, IVendor vendor)
|
|
: base(connectionString)
|
|
{
|
|
}
|
|
|
|
public Table<Category> Categories { get { return GetTable<Category>(); } }
|
|
public Table<Customer> Customers { get { return GetTable<Customer>(); } }
|
|
public Table<Employee> Employees { get { return GetTable<Employee>(); } }
|
|
public Table<EmployeeTerritory> EmployeeTerritories { get { return GetTable<EmployeeTerritory>(); } }
|
|
public Table<Order> Orders { get { return GetTable<Order>(); } }
|
|
public Table<OrderDetail> OrderDetails { get { return GetTable<OrderDetail>(); } }
|
|
public Table<Product> Products { get { return GetTable<Product>(); } }
|
|
public Table<Region> Regions { get { return GetTable<Region>(); } }
|
|
public Table<Supplier> Suppliers { get { return GetTable<Supplier>(); } }
|
|
public Table<Territory> Territories { get { return GetTable<Territory>(); } }
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.categories")]
|
|
public partial class Category
|
|
{
|
|
#region int CategoryID
|
|
|
|
public int _categoryID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_categoryID", Name = "categoryid", DbType = "INTEGER(4)", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false, Expression = "next value for \"linquser\".\"categories_seq\"")]
|
|
public int CategoryID
|
|
{
|
|
get
|
|
{
|
|
return _categoryID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _categoryID)
|
|
{
|
|
_categoryID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string CategoryName
|
|
|
|
public string _categoryName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_categoryName", Name = "categoryname", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string CategoryName
|
|
{
|
|
get
|
|
{
|
|
return _categoryName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _categoryName)
|
|
{
|
|
_categoryName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Description
|
|
|
|
public string _description;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_description", Name = "description", DbType = "VARCHAR(500)", AutoSync = AutoSync.Never)]
|
|
public string Description
|
|
{
|
|
get
|
|
{
|
|
return _description;
|
|
}
|
|
set
|
|
{
|
|
if (value != _description)
|
|
{
|
|
_description = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Byte[] Picture
|
|
|
|
public Byte[] _picture;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_picture", Name = "picture", DbType = "LONG BYTE", AutoSync = AutoSync.Never)]
|
|
public Byte[] Picture
|
|
{
|
|
get
|
|
{
|
|
return _picture;
|
|
}
|
|
set
|
|
{
|
|
if (value != _picture)
|
|
{
|
|
_picture = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<Product> _products;
|
|
[Association(Storage = "_products", OtherKey = "CategoryID", ThisKey = "CategoryID", Name = "products_$categ_u0000010a00000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<Product> Products
|
|
{
|
|
get
|
|
{
|
|
return _products;
|
|
}
|
|
set
|
|
{
|
|
_products = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void Products_Attach(Product entity)
|
|
{
|
|
entity.Category = this;
|
|
}
|
|
|
|
public void Products_Detach(Product entity)
|
|
{
|
|
entity.Category = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Category()
|
|
{
|
|
_products = new EntitySet<Product>(Products_Attach, Products_Detach);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.customers")]
|
|
public partial class Customer
|
|
{
|
|
#region string Address
|
|
|
|
public string _address;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_address", Name = "address", DbType = "VARCHAR(60)", AutoSync = AutoSync.Never)]
|
|
public string Address
|
|
{
|
|
get
|
|
{
|
|
return _address;
|
|
}
|
|
set
|
|
{
|
|
if (value != _address)
|
|
{
|
|
_address = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string City
|
|
|
|
public string _city;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_city", Name = "city", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string City
|
|
{
|
|
get
|
|
{
|
|
return _city;
|
|
}
|
|
set
|
|
{
|
|
if (value != _city)
|
|
{
|
|
_city = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string CompanyName
|
|
|
|
public string _companyName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_companyName", Name = "companyname", DbType = "VARCHAR(40)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string CompanyName
|
|
{
|
|
get
|
|
{
|
|
return _companyName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _companyName)
|
|
{
|
|
_companyName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ContactName
|
|
|
|
public string _contactName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_contactName", Name = "contactname", DbType = "VARCHAR(30)", AutoSync = AutoSync.Never)]
|
|
public string ContactName
|
|
{
|
|
get
|
|
{
|
|
return _contactName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _contactName)
|
|
{
|
|
_contactName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ContactTitle
|
|
|
|
public string _contactTitle;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_contactTitle", Name = "contacttitle", DbType = "VARCHAR(30)", AutoSync = AutoSync.Never)]
|
|
public string ContactTitle
|
|
{
|
|
get
|
|
{
|
|
return _contactTitle;
|
|
}
|
|
set
|
|
{
|
|
if (value != _contactTitle)
|
|
{
|
|
_contactTitle = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Country
|
|
|
|
public string _country;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_country", Name = "country", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string Country
|
|
{
|
|
get
|
|
{
|
|
return _country;
|
|
}
|
|
set
|
|
{
|
|
if (value != _country)
|
|
{
|
|
_country = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string CustomerID
|
|
|
|
public string _customerID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_customerID", Name = "customerid", DbType = "VARCHAR(5)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string CustomerID
|
|
{
|
|
get
|
|
{
|
|
return _customerID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _customerID)
|
|
{
|
|
_customerID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Fax
|
|
|
|
public string _fax;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_fax", Name = "fax", DbType = "VARCHAR(24)", AutoSync = AutoSync.Never)]
|
|
public string Fax
|
|
{
|
|
get
|
|
{
|
|
return _fax;
|
|
}
|
|
set
|
|
{
|
|
if (value != _fax)
|
|
{
|
|
_fax = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Phone
|
|
|
|
public string _phone;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_phone", Name = "phone", DbType = "VARCHAR(24)", AutoSync = AutoSync.Never)]
|
|
public string Phone
|
|
{
|
|
get
|
|
{
|
|
return _phone;
|
|
}
|
|
set
|
|
{
|
|
if (value != _phone)
|
|
{
|
|
_phone = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string PostalCode
|
|
|
|
public string _postalCode;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_postalCode", Name = "postalcode", DbType = "VARCHAR(10)", AutoSync = AutoSync.Never)]
|
|
public string PostalCode
|
|
{
|
|
get
|
|
{
|
|
return _postalCode;
|
|
}
|
|
set
|
|
{
|
|
if (value != _postalCode)
|
|
{
|
|
_postalCode = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Region
|
|
|
|
public string _region;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_region", Name = "region", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string Region
|
|
{
|
|
get
|
|
{
|
|
return _region;
|
|
}
|
|
set
|
|
{
|
|
if (value != _region)
|
|
{
|
|
_region = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<Order> _orders;
|
|
[Association(Storage = "_orders", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "orders_$custo_u0000012900000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<Order> Orders
|
|
{
|
|
get
|
|
{
|
|
return _orders;
|
|
}
|
|
set
|
|
{
|
|
_orders = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void Orders_Attach(Order entity)
|
|
{
|
|
entity.Customer = this;
|
|
}
|
|
|
|
public void Orders_Detach(Order entity)
|
|
{
|
|
entity.Customer = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Customer()
|
|
{
|
|
_orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.employees")]
|
|
public partial class Employee
|
|
{
|
|
#region string Address
|
|
|
|
public string _address;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_address", Name = "address", DbType = "VARCHAR(60)", AutoSync = AutoSync.Never)]
|
|
public string Address
|
|
{
|
|
get
|
|
{
|
|
return _address;
|
|
}
|
|
set
|
|
{
|
|
if (value != _address)
|
|
{
|
|
_address = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DateTime? BirthDate
|
|
|
|
public DateTime? _birthDate;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_birthDate", Name = "birthdate", DbType = "INGRESDATE", AutoSync = AutoSync.Never)]
|
|
public DateTime? BirthDate
|
|
{
|
|
get
|
|
{
|
|
return _birthDate;
|
|
}
|
|
set
|
|
{
|
|
if (value != _birthDate)
|
|
{
|
|
_birthDate = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string City
|
|
|
|
public string _city;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_city", Name = "city", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string City
|
|
{
|
|
get
|
|
{
|
|
return _city;
|
|
}
|
|
set
|
|
{
|
|
if (value != _city)
|
|
{
|
|
_city = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Country
|
|
|
|
public string _country;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_country", Name = "country", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string Country
|
|
{
|
|
get
|
|
{
|
|
return _country;
|
|
}
|
|
set
|
|
{
|
|
if (value != _country)
|
|
{
|
|
_country = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int EmployeeID
|
|
|
|
public int _employeeID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_employeeID", Name = "employeeid", DbType = "INTEGER(4)", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false, Expression = "next value for \"linquser\".\"employees_seq\"")]
|
|
public int EmployeeID
|
|
{
|
|
get
|
|
{
|
|
return _employeeID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _employeeID)
|
|
{
|
|
_employeeID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Extension
|
|
|
|
public string _extension;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_extension", Name = "extension", DbType = "VARCHAR(5)", AutoSync = AutoSync.Never)]
|
|
public string Extension
|
|
{
|
|
get
|
|
{
|
|
return _extension;
|
|
}
|
|
set
|
|
{
|
|
if (value != _extension)
|
|
{
|
|
_extension = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string FirstName
|
|
|
|
public string _firstName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_firstName", Name = "firstname", DbType = "VARCHAR(10)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string FirstName
|
|
{
|
|
get
|
|
{
|
|
return _firstName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _firstName)
|
|
{
|
|
_firstName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DateTime? HireDate
|
|
|
|
public DateTime? _hireDate;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_hireDate", Name = "hiredate", DbType = "INGRESDATE", AutoSync = AutoSync.Never)]
|
|
public DateTime? HireDate
|
|
{
|
|
get
|
|
{
|
|
return _hireDate;
|
|
}
|
|
set
|
|
{
|
|
if (value != _hireDate)
|
|
{
|
|
_hireDate = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string HomePhone
|
|
|
|
public string _homePhone;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_homePhone", Name = "homephone", DbType = "VARCHAR(24)", AutoSync = AutoSync.Never)]
|
|
public string HomePhone
|
|
{
|
|
get
|
|
{
|
|
return _homePhone;
|
|
}
|
|
set
|
|
{
|
|
if (value != _homePhone)
|
|
{
|
|
_homePhone = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string LastName
|
|
|
|
public string _lastName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_lastName", Name = "lastname", DbType = "VARCHAR(20)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string LastName
|
|
{
|
|
get
|
|
{
|
|
return _lastName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _lastName)
|
|
{
|
|
_lastName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Notes
|
|
|
|
public string _notes;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_notes", Name = "notes", DbType = "VARCHAR(100)", AutoSync = AutoSync.Never)]
|
|
public string Notes
|
|
{
|
|
get
|
|
{
|
|
return _notes;
|
|
}
|
|
set
|
|
{
|
|
if (value != _notes)
|
|
{
|
|
_notes = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Byte[] Photo
|
|
|
|
public Byte[] _photo;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_photo", Name = "photo", DbType = "LONG BYTE", AutoSync = AutoSync.Never)]
|
|
public Byte[] Photo
|
|
{
|
|
get
|
|
{
|
|
return _photo;
|
|
}
|
|
set
|
|
{
|
|
if (value != _photo)
|
|
{
|
|
_photo = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string PhotoPath
|
|
|
|
public string _photoPath;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_photoPath", Name = "photopath", DbType = "VARCHAR(255)", AutoSync = AutoSync.Never)]
|
|
public string PhotoPath
|
|
{
|
|
get
|
|
{
|
|
return _photoPath;
|
|
}
|
|
set
|
|
{
|
|
if (value != _photoPath)
|
|
{
|
|
_photoPath = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string PostalCode
|
|
|
|
public string _postalCode;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_postalCode", Name = "postalcode", DbType = "VARCHAR(10)", AutoSync = AutoSync.Never)]
|
|
public string PostalCode
|
|
{
|
|
get
|
|
{
|
|
return _postalCode;
|
|
}
|
|
set
|
|
{
|
|
if (value != _postalCode)
|
|
{
|
|
_postalCode = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Region
|
|
|
|
public string _region;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_region", Name = "region", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string Region
|
|
{
|
|
get
|
|
{
|
|
return _region;
|
|
}
|
|
set
|
|
{
|
|
if (value != _region)
|
|
{
|
|
_region = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int? ReportsTo
|
|
|
|
public int? _reportsTo;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_reportsTo", Name = "reportsto", DbType = "INTEGER(4)", AutoSync = AutoSync.Never)]
|
|
public int? ReportsTo
|
|
{
|
|
get
|
|
{
|
|
return _reportsTo;
|
|
}
|
|
set
|
|
{
|
|
if (value != _reportsTo)
|
|
{
|
|
_reportsTo = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Title
|
|
|
|
public string _title;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_title", Name = "title", DbType = "VARCHAR(30)", AutoSync = AutoSync.Never)]
|
|
public string Title
|
|
{
|
|
get
|
|
{
|
|
return _title;
|
|
}
|
|
set
|
|
{
|
|
if (value != _title)
|
|
{
|
|
_title = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string TitleOfCourtesy
|
|
|
|
public string _titleOfCourtesy;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_titleOfCourtesy", Name = "titleofcourtesy", DbType = "VARCHAR(25)", AutoSync = AutoSync.Never)]
|
|
public string TitleOfCourtesy
|
|
{
|
|
get
|
|
{
|
|
return _titleOfCourtesy;
|
|
}
|
|
set
|
|
{
|
|
if (value != _titleOfCourtesy)
|
|
{
|
|
_titleOfCourtesy = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<Employee> _employees;
|
|
[Association(Storage = "_employees", OtherKey = "ReportsTo", ThisKey = "EmployeeID", Name = "employees_$emplo_u0000012e00000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<Employee> Employees
|
|
{
|
|
get
|
|
{
|
|
return _employees;
|
|
}
|
|
set
|
|
{
|
|
_employees = value;
|
|
}
|
|
}
|
|
|
|
public EntitySet<EmployeeTerritory> _employeeTerritories;
|
|
[Association(Storage = "_employeeTerritories", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "employeeterritories_$emplo_u0000012e00000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<EmployeeTerritory> EmployeeTerritories
|
|
{
|
|
get
|
|
{
|
|
return _employeeTerritories;
|
|
}
|
|
set
|
|
{
|
|
_employeeTerritories = value;
|
|
}
|
|
}
|
|
|
|
public EntitySet<Order> _orders;
|
|
[Association(Storage = "_orders", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "orders_$emplo_u0000012e00000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<Order> Orders
|
|
{
|
|
get
|
|
{
|
|
return _orders;
|
|
}
|
|
set
|
|
{
|
|
_orders = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Parents
|
|
|
|
public EntityRef<Employee> _reportsToEmployee;
|
|
[Association(Storage = "_reportsToEmployee", OtherKey = "EmployeeID", ThisKey = "ReportsTo", Name = "employees_$emplo_u0000012e00000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Employee ReportsToEmployee
|
|
{
|
|
get
|
|
{
|
|
return _reportsToEmployee.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _reportsToEmployee.Entity)
|
|
{
|
|
if (_reportsToEmployee.Entity != null)
|
|
{
|
|
var previousEmployee = _reportsToEmployee.Entity;
|
|
_reportsToEmployee.Entity = null;
|
|
previousEmployee.Employees.Remove(this);
|
|
}
|
|
_reportsToEmployee.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.Employees.Add(this);
|
|
_reportsTo = value.EmployeeID;
|
|
}
|
|
else
|
|
{
|
|
_reportsTo = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void Employees_Attach(Employee entity)
|
|
{
|
|
entity.ReportsToEmployee = this;
|
|
}
|
|
|
|
public void Employees_Detach(Employee entity)
|
|
{
|
|
entity.ReportsToEmployee = null;
|
|
}
|
|
|
|
public void EmployeeTerritories_Attach(EmployeeTerritory entity)
|
|
{
|
|
entity.Employee = this;
|
|
}
|
|
|
|
public void EmployeeTerritories_Detach(EmployeeTerritory entity)
|
|
{
|
|
entity.Employee = null;
|
|
}
|
|
|
|
public void Orders_Attach(Order entity)
|
|
{
|
|
entity.Employee = this;
|
|
}
|
|
|
|
public void Orders_Detach(Order entity)
|
|
{
|
|
entity.Employee = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Employee()
|
|
{
|
|
_employees = new EntitySet<Employee>(Employees_Attach, Employees_Detach);
|
|
_employeeTerritories = new EntitySet<EmployeeTerritory>(EmployeeTerritories_Attach, EmployeeTerritories_Detach);
|
|
_orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
|
|
_reportsToEmployee = new EntityRef<Employee>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.employeeterritories")]
|
|
public partial class EmployeeTerritory
|
|
{
|
|
#region int EmployeeID
|
|
|
|
public int _employeeID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_employeeID", Name = "employeeid", DbType = "INTEGER(4)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public int EmployeeID
|
|
{
|
|
get
|
|
{
|
|
return _employeeID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _employeeID)
|
|
{
|
|
_employeeID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string TerritoryID
|
|
|
|
public string _territoryID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_territoryID", Name = "territoryid", DbType = "VARCHAR(20)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string TerritoryID
|
|
{
|
|
get
|
|
{
|
|
return _territoryID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _territoryID)
|
|
{
|
|
_territoryID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Parents
|
|
|
|
public EntityRef<Employee> _employee;
|
|
[Association(Storage = "_employee", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "employeeterritories_$emplo_u0000012e00000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Employee Employee
|
|
{
|
|
get
|
|
{
|
|
return _employee.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _employee.Entity)
|
|
{
|
|
if (_employee.Entity != null)
|
|
{
|
|
var previousEmployee = _employee.Entity;
|
|
_employee.Entity = null;
|
|
previousEmployee.EmployeeTerritories.Remove(this);
|
|
}
|
|
_employee.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.EmployeeTerritories.Add(this);
|
|
_employeeID = value.EmployeeID;
|
|
}
|
|
else
|
|
{
|
|
_employeeID = default(int);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public EntityRef<Territory> _territory;
|
|
[Association(Storage = "_territory", OtherKey = "TerritoryID", ThisKey = "TerritoryID", Name = "employeeterritories_$terri_u000000fb00000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Territory Territory
|
|
{
|
|
get
|
|
{
|
|
return _territory.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _territory.Entity)
|
|
{
|
|
if (_territory.Entity != null)
|
|
{
|
|
var previousTerritory = _territory.Entity;
|
|
_territory.Entity = null;
|
|
previousTerritory.EmployeeTerritories.Remove(this);
|
|
}
|
|
_territory.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.EmployeeTerritories.Add(this);
|
|
_territoryID = value.TerritoryID;
|
|
}
|
|
else
|
|
{
|
|
_territoryID = default(string);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public EmployeeTerritory()
|
|
{
|
|
_employee = new EntityRef<Employee>();
|
|
_territory = new EntityRef<Territory>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.orders")]
|
|
public partial class Order
|
|
{
|
|
#region string CustomerID
|
|
|
|
public string _customerID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_customerID", Name = "customerid", DbType = "VARCHAR(5)", AutoSync = AutoSync.Never)]
|
|
public string CustomerID
|
|
{
|
|
get
|
|
{
|
|
return _customerID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _customerID)
|
|
{
|
|
_customerID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int? EmployeeID
|
|
|
|
public int? _employeeID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_employeeID", Name = "employeeid", DbType = "INTEGER(4)", AutoSync = AutoSync.Never)]
|
|
public int? EmployeeID
|
|
{
|
|
get
|
|
{
|
|
return _employeeID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _employeeID)
|
|
{
|
|
_employeeID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region decimal? Freight
|
|
|
|
public decimal? _freight;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_freight", Name = "freight", DbType = "DECIMAL(5, 0)", AutoSync = AutoSync.Never)]
|
|
public decimal? Freight
|
|
{
|
|
get
|
|
{
|
|
return _freight;
|
|
}
|
|
set
|
|
{
|
|
if (value != _freight)
|
|
{
|
|
_freight = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DateTime? OrderDate
|
|
|
|
public DateTime? _orderDate;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_orderDate", Name = "orderdate", DbType = "INGRESDATE", AutoSync = AutoSync.Never)]
|
|
public DateTime? OrderDate
|
|
{
|
|
get
|
|
{
|
|
return _orderDate;
|
|
}
|
|
set
|
|
{
|
|
if (value != _orderDate)
|
|
{
|
|
_orderDate = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int OrderID
|
|
|
|
public int _orderID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_orderID", Name = "orderid", DbType = "INTEGER(4)", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false, Expression = "next value for \"linquser\".\"orders_seq\"")]
|
|
public int OrderID
|
|
{
|
|
get
|
|
{
|
|
return _orderID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _orderID)
|
|
{
|
|
_orderID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DateTime? RequiredDate
|
|
|
|
public DateTime? _requiredDate;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_requiredDate", Name = "requireddate", DbType = "INGRESDATE", AutoSync = AutoSync.Never)]
|
|
public DateTime? RequiredDate
|
|
{
|
|
get
|
|
{
|
|
return _requiredDate;
|
|
}
|
|
set
|
|
{
|
|
if (value != _requiredDate)
|
|
{
|
|
_requiredDate = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ShipAddress
|
|
|
|
public string _shipAddress;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipAddress", Name = "shipaddress", DbType = "VARCHAR(60)", AutoSync = AutoSync.Never)]
|
|
public string ShipAddress
|
|
{
|
|
get
|
|
{
|
|
return _shipAddress;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipAddress)
|
|
{
|
|
_shipAddress = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ShipCity
|
|
|
|
public string _shipCity;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipCity", Name = "shipcity", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string ShipCity
|
|
{
|
|
get
|
|
{
|
|
return _shipCity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipCity)
|
|
{
|
|
_shipCity = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ShipCountry
|
|
|
|
public string _shipCountry;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipCountry", Name = "shipcountry", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string ShipCountry
|
|
{
|
|
get
|
|
{
|
|
return _shipCountry;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipCountry)
|
|
{
|
|
_shipCountry = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ShipName
|
|
|
|
public string _shipName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipName", Name = "shipname", DbType = "VARCHAR(40)", AutoSync = AutoSync.Never)]
|
|
public string ShipName
|
|
{
|
|
get
|
|
{
|
|
return _shipName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipName)
|
|
{
|
|
_shipName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DateTime? ShippedDate
|
|
|
|
public DateTime? _shippedDate;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shippedDate", Name = "shippeddate", DbType = "INGRESDATE", AutoSync = AutoSync.Never)]
|
|
public DateTime? ShippedDate
|
|
{
|
|
get
|
|
{
|
|
return _shippedDate;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shippedDate)
|
|
{
|
|
_shippedDate = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ShipPostalCode
|
|
|
|
public string _shipPostalCode;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipPostalCode", Name = "shippostalcode", DbType = "VARCHAR(10)", AutoSync = AutoSync.Never)]
|
|
public string ShipPostalCode
|
|
{
|
|
get
|
|
{
|
|
return _shipPostalCode;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipPostalCode)
|
|
{
|
|
_shipPostalCode = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ShipRegion
|
|
|
|
public string _shipRegion;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipRegion", Name = "shipregion", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string ShipRegion
|
|
{
|
|
get
|
|
{
|
|
return _shipRegion;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipRegion)
|
|
{
|
|
_shipRegion = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int? ShipVia
|
|
|
|
public int? _shipVia;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_shipVia", Name = "shipvia", DbType = "INTEGER(4)", AutoSync = AutoSync.Never)]
|
|
public int? ShipVia
|
|
{
|
|
get
|
|
{
|
|
return _shipVia;
|
|
}
|
|
set
|
|
{
|
|
if (value != _shipVia)
|
|
{
|
|
_shipVia = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<OrderDetail> _orderDetails;
|
|
[Association(Storage = "_orderDetails", OtherKey = "OrderID", ThisKey = "OrderID", Name = "orderdetails_$order_u0000015300000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<OrderDetail> OrderDetails
|
|
{
|
|
get
|
|
{
|
|
return _orderDetails;
|
|
}
|
|
set
|
|
{
|
|
_orderDetails = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Parents
|
|
|
|
public EntityRef<Customer> _customer;
|
|
[Association(Storage = "_customer", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "orders_$custo_u0000012900000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Customer Customer
|
|
{
|
|
get
|
|
{
|
|
return _customer.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _customer.Entity)
|
|
{
|
|
if (_customer.Entity != null)
|
|
{
|
|
var previousCustomer = _customer.Entity;
|
|
_customer.Entity = null;
|
|
previousCustomer.Orders.Remove(this);
|
|
}
|
|
_customer.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.Orders.Add(this);
|
|
_customerID = value.CustomerID;
|
|
}
|
|
else
|
|
{
|
|
_customerID = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public EntityRef<Employee> _employee;
|
|
[Association(Storage = "_employee", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "orders_$emplo_u0000012e00000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Employee Employee
|
|
{
|
|
get
|
|
{
|
|
return _employee.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _employee.Entity)
|
|
{
|
|
if (_employee.Entity != null)
|
|
{
|
|
var previousEmployee = _employee.Entity;
|
|
_employee.Entity = null;
|
|
previousEmployee.Orders.Remove(this);
|
|
}
|
|
_employee.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.Orders.Add(this);
|
|
_employeeID = value.EmployeeID;
|
|
}
|
|
else
|
|
{
|
|
_employeeID = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void OrderDetails_Attach(OrderDetail entity)
|
|
{
|
|
entity.Order = this;
|
|
}
|
|
|
|
public void OrderDetails_Detach(OrderDetail entity)
|
|
{
|
|
entity.Order = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Order()
|
|
{
|
|
_orderDetails = new EntitySet<OrderDetail>(OrderDetails_Attach, OrderDetails_Detach);
|
|
_customer = new EntityRef<Customer>();
|
|
_employee = new EntityRef<Employee>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.orderdetails")]
|
|
public partial class OrderDetail
|
|
{
|
|
#region double Discount
|
|
|
|
public double _discount;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_discount", Name = "discount", DbType = "FLOAT", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public double Discount
|
|
{
|
|
get
|
|
{
|
|
return _discount;
|
|
}
|
|
set
|
|
{
|
|
if (value != _discount)
|
|
{
|
|
_discount = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int OrderID
|
|
|
|
public int _orderID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_orderID", Name = "orderid", DbType = "INTEGER(4)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public int OrderID
|
|
{
|
|
get
|
|
{
|
|
return _orderID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _orderID)
|
|
{
|
|
_orderID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int ProductID
|
|
|
|
public int _productID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_productID", Name = "productid", DbType = "INTEGER(4)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public int ProductID
|
|
{
|
|
get
|
|
{
|
|
return _productID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _productID)
|
|
{
|
|
_productID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region short Quantity
|
|
|
|
public short _quantity;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_quantity", Name = "quantity", DbType = "INTEGER(2)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public short Quantity
|
|
{
|
|
get
|
|
{
|
|
return _quantity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _quantity)
|
|
{
|
|
_quantity = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region decimal UnitPrice
|
|
|
|
public decimal _unitPrice;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_unitPrice", Name = "unitprice", DbType = "DECIMAL(5, 0)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public decimal UnitPrice
|
|
{
|
|
get
|
|
{
|
|
return _unitPrice;
|
|
}
|
|
set
|
|
{
|
|
if (value != _unitPrice)
|
|
{
|
|
_unitPrice = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Parents
|
|
|
|
public EntityRef<Order> _order;
|
|
[Association(Storage = "_order", OtherKey = "OrderID", ThisKey = "OrderID", Name = "orderdetails_$order_u0000015300000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Order Order
|
|
{
|
|
get
|
|
{
|
|
return _order.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _order.Entity)
|
|
{
|
|
if (_order.Entity != null)
|
|
{
|
|
var previousOrder = _order.Entity;
|
|
_order.Entity = null;
|
|
previousOrder.OrderDetails.Remove(this);
|
|
}
|
|
_order.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.OrderDetails.Add(this);
|
|
_orderID = value.OrderID;
|
|
}
|
|
else
|
|
{
|
|
_orderID = default(int);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public EntityRef<Product> _product;
|
|
[Association(Storage = "_product", OtherKey = "ProductID", ThisKey = "ProductID", Name = "orderdetails_$produ_u0000011200000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Product Product
|
|
{
|
|
get
|
|
{
|
|
return _product.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _product.Entity)
|
|
{
|
|
if (_product.Entity != null)
|
|
{
|
|
var previousProduct = _product.Entity;
|
|
_product.Entity = null;
|
|
previousProduct.OrderDetails.Remove(this);
|
|
}
|
|
_product.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.OrderDetails.Add(this);
|
|
_productID = value.ProductID;
|
|
}
|
|
else
|
|
{
|
|
_productID = default(int);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public OrderDetail()
|
|
{
|
|
_order = new EntityRef<Order>();
|
|
_product = new EntityRef<Product>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.products")]
|
|
public partial class Product
|
|
{
|
|
#region int? CategoryID
|
|
|
|
public int? _categoryID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_categoryID", Name = "categoryid", DbType = "INTEGER(4)", AutoSync = AutoSync.Never)]
|
|
public int? CategoryID
|
|
{
|
|
get
|
|
{
|
|
return _categoryID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _categoryID)
|
|
{
|
|
_categoryID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region short Discontinued
|
|
|
|
public string _discontinued;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_discontinued", Name = "discontinued", DbType = "CHAR(1)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string Discontinued
|
|
{
|
|
get
|
|
{
|
|
return _discontinued;
|
|
}
|
|
set
|
|
{
|
|
if (value != _discontinued)
|
|
{
|
|
_discontinued = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int ProductID
|
|
|
|
public int _productID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_productID", Name = "productid", DbType = "INTEGER(4)", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false, Expression = "next value for \"linquser\".\"products_seq\"")]
|
|
public int ProductID
|
|
{
|
|
get
|
|
{
|
|
return _productID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _productID)
|
|
{
|
|
_productID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ProductName
|
|
|
|
public string _productName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_productName", Name = "productname", DbType = "VARCHAR(40)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string ProductName
|
|
{
|
|
get
|
|
{
|
|
return _productName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _productName)
|
|
{
|
|
_productName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string QuantityPerUnit
|
|
|
|
public string _quantityPerUnit;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_quantityPerUnit", Name = "quantityperunit", DbType = "VARCHAR(20)", AutoSync = AutoSync.Never)]
|
|
public string QuantityPerUnit
|
|
{
|
|
get
|
|
{
|
|
return _quantityPerUnit;
|
|
}
|
|
set
|
|
{
|
|
if (value != _quantityPerUnit)
|
|
{
|
|
_quantityPerUnit = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region short? ReorderLevel
|
|
|
|
public short? _reorderLevel;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_reorderLevel", Name = "reorderlevel", DbType = "INTEGER(2)", AutoSync = AutoSync.Never)]
|
|
public short? ReorderLevel
|
|
{
|
|
get
|
|
{
|
|
return _reorderLevel;
|
|
}
|
|
set
|
|
{
|
|
if (value != _reorderLevel)
|
|
{
|
|
_reorderLevel = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int? SupplierID
|
|
|
|
public int? _supplierID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_supplierID", Name = "supplierid", DbType = "INTEGER(4)", AutoSync = AutoSync.Never)]
|
|
public int? SupplierID
|
|
{
|
|
get
|
|
{
|
|
return _supplierID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _supplierID)
|
|
{
|
|
_supplierID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region decimal? UnitPrice
|
|
|
|
public decimal? _unitPrice;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_unitPrice", Name = "unitprice", DbType = "DECIMAL(5, 0)", AutoSync = AutoSync.Never)]
|
|
public decimal? UnitPrice
|
|
{
|
|
get
|
|
{
|
|
return _unitPrice;
|
|
}
|
|
set
|
|
{
|
|
if (value != _unitPrice)
|
|
{
|
|
_unitPrice = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region short? UnitsInStock
|
|
|
|
public short? _unitsInStock;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_unitsInStock", Name = "unitsinstock", DbType = "INTEGER(2)", AutoSync = AutoSync.Never)]
|
|
public short? UnitsInStock
|
|
{
|
|
get
|
|
{
|
|
return _unitsInStock;
|
|
}
|
|
set
|
|
{
|
|
if (value != _unitsInStock)
|
|
{
|
|
_unitsInStock = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region short? UnitsOnOrder
|
|
|
|
public short? _unitsOnOrder;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_unitsOnOrder", Name = "unitsonorder", DbType = "INTEGER(2)", AutoSync = AutoSync.Never)]
|
|
public short? UnitsOnOrder
|
|
{
|
|
get
|
|
{
|
|
return _unitsOnOrder;
|
|
}
|
|
set
|
|
{
|
|
if (value != _unitsOnOrder)
|
|
{
|
|
_unitsOnOrder = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<OrderDetail> _orderDetails;
|
|
[Association(Storage = "_orderDetails", OtherKey = "ProductID", ThisKey = "ProductID", Name = "orderdetails_$produ_u0000011200000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<OrderDetail> OrderDetails
|
|
{
|
|
get
|
|
{
|
|
return _orderDetails;
|
|
}
|
|
set
|
|
{
|
|
_orderDetails = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Parents
|
|
|
|
public EntityRef<Category> _category;
|
|
[Association(Storage = "_category", OtherKey = "CategoryID", ThisKey = "CategoryID", Name = "products_$categ_u0000010a00000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Category Category
|
|
{
|
|
get
|
|
{
|
|
return _category.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _category.Entity)
|
|
{
|
|
if (_category.Entity != null)
|
|
{
|
|
var previousCategory = _category.Entity;
|
|
_category.Entity = null;
|
|
previousCategory.Products.Remove(this);
|
|
}
|
|
_category.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.Products.Add(this);
|
|
_categoryID = value.CategoryID;
|
|
}
|
|
else
|
|
{
|
|
_categoryID = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public EntityRef<Supplier> _supplier;
|
|
[Association(Storage = "_supplier", OtherKey = "SupplierID", ThisKey = "SupplierID", Name = "products_$suppl_u0000010e00000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Supplier Supplier
|
|
{
|
|
get
|
|
{
|
|
return _supplier.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _supplier.Entity)
|
|
{
|
|
if (_supplier.Entity != null)
|
|
{
|
|
var previousSupplier = _supplier.Entity;
|
|
_supplier.Entity = null;
|
|
previousSupplier.Products.Remove(this);
|
|
}
|
|
_supplier.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.Products.Add(this);
|
|
_supplierID = value.SupplierID;
|
|
}
|
|
else
|
|
{
|
|
_supplierID = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void OrderDetails_Attach(OrderDetail entity)
|
|
{
|
|
entity.Product = this;
|
|
}
|
|
|
|
public void OrderDetails_Detach(OrderDetail entity)
|
|
{
|
|
entity.Product = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Product()
|
|
{
|
|
_orderDetails = new EntitySet<OrderDetail>(OrderDetails_Attach, OrderDetails_Detach);
|
|
_category = new EntityRef<Category>();
|
|
_supplier = new EntityRef<Supplier>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.region")]
|
|
public partial class Region
|
|
{
|
|
#region string RegionDescription
|
|
|
|
public string _regionDescription;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_regionDescription", Name = "regiondescription", DbType = "VARCHAR(50)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string RegionDescription
|
|
{
|
|
get
|
|
{
|
|
return _regionDescription;
|
|
}
|
|
set
|
|
{
|
|
if (value != _regionDescription)
|
|
{
|
|
_regionDescription = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int RegionID
|
|
|
|
public int _regionID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_regionID", Name = "regionid", DbType = "INTEGER(4)", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false, Expression = "next value for \"linquser\".\"region_seq\"")]
|
|
public int RegionID
|
|
{
|
|
get
|
|
{
|
|
return _regionID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _regionID)
|
|
{
|
|
_regionID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<Territory> _territories;
|
|
[Association(Storage = "_territories", OtherKey = "RegionID", ThisKey = "RegionID", Name = "territories_$regio_u000000f800000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<Territory> Territories
|
|
{
|
|
get
|
|
{
|
|
return _territories;
|
|
}
|
|
set
|
|
{
|
|
_territories = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void Territories_Attach(Territory entity)
|
|
{
|
|
entity.Region = this;
|
|
}
|
|
|
|
public void Territories_Detach(Territory entity)
|
|
{
|
|
entity.Region = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Region()
|
|
{
|
|
_territories = new EntitySet<Territory>(Territories_Attach, Territories_Detach);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.suppliers")]
|
|
public partial class Supplier
|
|
{
|
|
#region string Address
|
|
|
|
public string _address;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_address", Name = "address", DbType = "VARCHAR(60)", AutoSync = AutoSync.Never)]
|
|
public string Address
|
|
{
|
|
get
|
|
{
|
|
return _address;
|
|
}
|
|
set
|
|
{
|
|
if (value != _address)
|
|
{
|
|
_address = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string City
|
|
|
|
public string _city;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_city", Name = "city", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string City
|
|
{
|
|
get
|
|
{
|
|
return _city;
|
|
}
|
|
set
|
|
{
|
|
if (value != _city)
|
|
{
|
|
_city = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string CompanyName
|
|
|
|
public string _companyName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_companyName", Name = "companyname", DbType = "VARCHAR(40)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string CompanyName
|
|
{
|
|
get
|
|
{
|
|
return _companyName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _companyName)
|
|
{
|
|
_companyName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ContactName
|
|
|
|
public string _contactName;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_contactName", Name = "contactname", DbType = "VARCHAR(30)", AutoSync = AutoSync.Never)]
|
|
public string ContactName
|
|
{
|
|
get
|
|
{
|
|
return _contactName;
|
|
}
|
|
set
|
|
{
|
|
if (value != _contactName)
|
|
{
|
|
_contactName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string ContactTitle
|
|
|
|
public string _contactTitle;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_contactTitle", Name = "contacttitle", DbType = "VARCHAR(30)", AutoSync = AutoSync.Never)]
|
|
public string ContactTitle
|
|
{
|
|
get
|
|
{
|
|
return _contactTitle;
|
|
}
|
|
set
|
|
{
|
|
if (value != _contactTitle)
|
|
{
|
|
_contactTitle = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Country
|
|
|
|
public string _country;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_country", Name = "country", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string Country
|
|
{
|
|
get
|
|
{
|
|
return _country;
|
|
}
|
|
set
|
|
{
|
|
if (value != _country)
|
|
{
|
|
_country = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Fax
|
|
|
|
public string _fax;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_fax", Name = "fax", DbType = "VARCHAR(24)", AutoSync = AutoSync.Never)]
|
|
public string Fax
|
|
{
|
|
get
|
|
{
|
|
return _fax;
|
|
}
|
|
set
|
|
{
|
|
if (value != _fax)
|
|
{
|
|
_fax = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Phone
|
|
|
|
public string _phone;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_phone", Name = "phone", DbType = "VARCHAR(24)", AutoSync = AutoSync.Never)]
|
|
public string Phone
|
|
{
|
|
get
|
|
{
|
|
return _phone;
|
|
}
|
|
set
|
|
{
|
|
if (value != _phone)
|
|
{
|
|
_phone = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string PostalCode
|
|
|
|
public string _postalCode;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_postalCode", Name = "postalcode", DbType = "VARCHAR(10)", AutoSync = AutoSync.Never)]
|
|
public string PostalCode
|
|
{
|
|
get
|
|
{
|
|
return _postalCode;
|
|
}
|
|
set
|
|
{
|
|
if (value != _postalCode)
|
|
{
|
|
_postalCode = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string Region
|
|
|
|
public string _region;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_region", Name = "region", DbType = "VARCHAR(15)", AutoSync = AutoSync.Never)]
|
|
public string Region
|
|
{
|
|
get
|
|
{
|
|
return _region;
|
|
}
|
|
set
|
|
{
|
|
if (value != _region)
|
|
{
|
|
_region = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region int SupplierID
|
|
|
|
public int _supplierID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_supplierID", Name = "supplierid", DbType = "INTEGER(4)", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false, Expression = "next value for \"linquser\".\"suppliers_seq\"")]
|
|
public int SupplierID
|
|
{
|
|
get
|
|
{
|
|
return _supplierID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _supplierID)
|
|
{
|
|
_supplierID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<Product> _products;
|
|
[Association(Storage = "_products", OtherKey = "SupplierID", ThisKey = "SupplierID", Name = "products_$suppl_u0000010e00000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<Product> Products
|
|
{
|
|
get
|
|
{
|
|
return _products;
|
|
}
|
|
set
|
|
{
|
|
_products = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void Products_Attach(Product entity)
|
|
{
|
|
entity.Supplier = this;
|
|
}
|
|
|
|
public void Products_Detach(Product entity)
|
|
{
|
|
entity.Supplier = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Supplier()
|
|
{
|
|
_products = new EntitySet<Product>(Products_Attach, Products_Detach);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
[Table(Name = "linquser.territories")]
|
|
public partial class Territory
|
|
{
|
|
#region int RegionID
|
|
|
|
public int _regionID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_regionID", Name = "regionid", DbType = "INTEGER(4)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public int RegionID
|
|
{
|
|
get
|
|
{
|
|
return _regionID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _regionID)
|
|
{
|
|
_regionID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string TerritoryDescription
|
|
|
|
public string _territoryDescription;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_territoryDescription", Name = "territorydescription", DbType = "VARCHAR(50)", AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string TerritoryDescription
|
|
{
|
|
get
|
|
{
|
|
return _territoryDescription;
|
|
}
|
|
set
|
|
{
|
|
if (value != _territoryDescription)
|
|
{
|
|
_territoryDescription = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region string TerritoryID
|
|
|
|
public string _territoryID;
|
|
[DebuggerNonUserCode]
|
|
[Column(Storage = "_territoryID", Name = "territoryid", DbType = "VARCHAR(20)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
|
|
public string TerritoryID
|
|
{
|
|
get
|
|
{
|
|
return _territoryID;
|
|
}
|
|
set
|
|
{
|
|
if (value != _territoryID)
|
|
{
|
|
_territoryID = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Children
|
|
|
|
public EntitySet<EmployeeTerritory> _employeeTerritories;
|
|
[Association(Storage = "_employeeTerritories", OtherKey = "TerritoryID", ThisKey = "TerritoryID", Name = "employeeterritories_$terri_u000000fb00000000")]
|
|
[DebuggerNonUserCode]
|
|
public EntitySet<EmployeeTerritory> EmployeeTerritories
|
|
{
|
|
get
|
|
{
|
|
return _employeeTerritories;
|
|
}
|
|
set
|
|
{
|
|
_employeeTerritories = value;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Parents
|
|
|
|
public EntityRef<Region> _region;
|
|
[Association(Storage = "_region", OtherKey = "RegionID", ThisKey = "RegionID", Name = "territories_$regio_u000000f800000000", IsForeignKey = true)]
|
|
[DebuggerNonUserCode]
|
|
public Region Region
|
|
{
|
|
get
|
|
{
|
|
return _region.Entity;
|
|
}
|
|
set
|
|
{
|
|
if (value != _region.Entity)
|
|
{
|
|
if (_region.Entity != null)
|
|
{
|
|
var previousRegion = _region.Entity;
|
|
_region.Entity = null;
|
|
previousRegion.Territories.Remove(this);
|
|
}
|
|
_region.Entity = value;
|
|
if (value != null)
|
|
{
|
|
value.Territories.Add(this);
|
|
_regionID = value.RegionID;
|
|
}
|
|
else
|
|
{
|
|
_regionID = default(int);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Attachement handlers
|
|
|
|
public void EmployeeTerritories_Attach(EmployeeTerritory entity)
|
|
{
|
|
entity.Territory = this;
|
|
}
|
|
|
|
public void EmployeeTerritories_Detach(EmployeeTerritory entity)
|
|
{
|
|
entity.Territory = null;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region ctor
|
|
|
|
public Territory()
|
|
{
|
|
_employeeTerritories = new EntitySet<EmployeeTerritory>(EmployeeTerritories_Attach, EmployeeTerritories_Detach);
|
|
_region = new EntityRef<Region>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|