From 03becf5f5b5d855d437bfa287552826579ebd5ca Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Mon, 1 Jan 2018 16:54:27 +0530 Subject: [PATCH 1/2] RawBencher related files and tests --- src/NHibernate.Test/NHibernate.Test.csproj | 2 + .../RawBenchSessionManagerPerfomance.cs | 110 +++++ src/NHibernate.sln | 14 +- src/RawBencher/Model/EntityClasses/Address.cs | 150 +++++++ .../Model/EntityClasses/AddressType.cs | 92 +++++ .../Model/EntityClasses/BillOfMaterial.cs | 123 ++++++ .../Model/EntityClasses/BusinessEntity.cs | 117 ++++++ .../EntityClasses/BusinessEntityAddress.cs | 85 ++++ .../EntityClasses/BusinessEntityContact.cs | 85 ++++ .../Model/EntityClasses/ContactCreditCard.cs | 69 ++++ .../Model/EntityClasses/ContactType.cs | 84 ++++ .../Model/EntityClasses/CountryRegion.cs | 102 +++++ .../EntityClasses/CountryRegionCurrency.cs | 69 ++++ .../Model/EntityClasses/CreditCard.cs | 117 ++++++ src/RawBencher/Model/EntityClasses/Culture.cs | 84 ++++ .../Model/EntityClasses/Currency.cs | 102 +++++ .../Model/EntityClasses/CurrencyRate.cs | 116 ++++++ .../Model/EntityClasses/Customer.cs | 116 ++++++ .../Model/EntityClasses/Department.cs | 92 +++++ .../Model/EntityClasses/Document.cs | 172 ++++++++ .../Model/EntityClasses/EmailAddress.cs | 85 ++++ .../Model/EntityClasses/Employee.cs | 235 +++++++++++ .../EmployeeDepartmentHistory.cs | 93 +++++ .../Model/EntityClasses/EmployeePayHistory.cs | 85 ++++ .../Model/EntityClasses/Illustration.cs | 84 ++++ .../Model/EntityClasses/JobCandidate.cs | 83 ++++ .../Model/EntityClasses/Location.cs | 109 +++++ .../Model/EntityClasses/Password.cs | 94 +++++ src/RawBencher/Model/EntityClasses/Person.cs | 219 ++++++++++ .../Model/EntityClasses/PersonPhone.cs | 77 ++++ .../Model/EntityClasses/PhoneNumberType.cs | 84 ++++ src/RawBencher/Model/EntityClasses/Product.cs | 377 ++++++++++++++++++ .../Model/EntityClasses/ProductCategory.cs | 92 +++++ .../Model/EntityClasses/ProductCostHistory.cs | 85 ++++ .../Model/EntityClasses/ProductDescription.cs | 92 +++++ .../Model/EntityClasses/ProductDocument.cs | 69 ++++ .../Model/EntityClasses/ProductInventory.cs | 101 +++++ .../EntityClasses/ProductListPriceHistory.cs | 85 ++++ .../Model/EntityClasses/ProductModel.cs | 126 ++++++ .../EntityClasses/ProductModelIllustration.cs | 69 ++++ .../ProductModelProductDescriptionCulture.cs | 77 ++++ .../Model/EntityClasses/ProductPhoto.cs | 108 +++++ .../EntityClasses/ProductProductPhoto.cs | 77 ++++ .../Model/EntityClasses/ProductReview.cs | 115 ++++++ .../Model/EntityClasses/ProductSubcategory.cs | 100 +++++ .../Model/EntityClasses/ProductVendor.cs | 133 ++++++ .../EntityClasses/PurchaseOrderDetail.cs | 133 ++++++ .../EntityClasses/PurchaseOrderHeader.cs | 164 ++++++++ .../Model/EntityClasses/SalesOrderDetail.cs | 125 ++++++ .../Model/EntityClasses/SalesOrderHeader.cs | 277 +++++++++++++ .../SalesOrderHeaderSalesReason.cs | 69 ++++ .../Model/EntityClasses/SalesPerson.cs | 162 ++++++++ .../EntityClasses/SalesPersonQuotaHistory.cs | 85 ++++ .../Model/EntityClasses/SalesReason.cs | 92 +++++ .../Model/EntityClasses/SalesTaxRate.cs | 107 +++++ .../Model/EntityClasses/SalesTerritory.cs | 176 ++++++++ .../EntityClasses/SalesTerritoryHistory.cs | 93 +++++ .../Model/EntityClasses/ScrapReason.cs | 84 ++++ src/RawBencher/Model/EntityClasses/Shift.cs | 100 +++++ .../Model/EntityClasses/ShipMethod.cs | 117 ++++++ .../Model/EntityClasses/ShoppingCartItem.cs | 99 +++++ .../Model/EntityClasses/SpecialOffer.cs | 148 +++++++ .../EntityClasses/SpecialOfferProduct.cs | 86 ++++ .../Model/EntityClasses/StateProvince.cs | 133 ++++++ src/RawBencher/Model/EntityClasses/Store.cs | 111 ++++++ .../Model/EntityClasses/TransactionHistory.cs | 123 ++++++ .../TransactionHistoryArchive.cs | 123 ++++++ .../Model/EntityClasses/UnitMeasure.cs | 111 ++++++ src/RawBencher/Model/EntityClasses/Vendor.cs | 136 +++++++ .../Model/EntityClasses/WorkOrder.cs | 140 +++++++ .../Model/EntityClasses/WorkOrderRouting.cs | 141 +++++++ src/RawBencher/Model/NH.Bencher.Model.csproj | 256 ++++++++++++ .../Model/Properties/AssemblyInfo.cs | 24 ++ .../EntityMappings/Address.hbm.xml | 41 ++ .../EntityMappings/AddressType.hbm.xml | 22 + .../EntityMappings/BillOfMaterial.hbm.xml | 27 ++ .../EntityMappings/BusinessEntity.hbm.xml | 30 ++ .../BusinessEntityAddress.hbm.xml | 17 + .../BusinessEntityContact.hbm.xml | 17 + .../EntityMappings/ContactCreditCard.hbm.xml | 15 + .../EntityMappings/ContactType.hbm.xml | 21 + .../EntityMappings/CountryRegion.hbm.xml | 33 ++ .../CountryRegionCurrency.hbm.xml | 15 + .../EntityMappings/CreditCard.hbm.xml | 30 ++ .../EntityMappings/Culture.hbm.xml | 21 + .../EntityMappings/Currency.hbm.xml | 33 ++ .../EntityMappings/CurrencyRate.hbm.xml | 29 ++ .../EntityMappings/Customer.hbm.xml | 31 ++ .../EntityMappings/Department.hbm.xml | 22 + .../EntityMappings/Document.hbm.xml | 34 ++ .../EntityMappings/EmailAddress.hbm.xml | 16 + .../EntityMappings/Employee.hbm.xml | 62 +++ .../EmployeeDepartmentHistory.hbm.xml | 18 + .../EntityMappings/EmployeePayHistory.hbm.xml | 17 + .../EntityMappings/Illustration.hbm.xml | 21 + .../EntityMappings/JobCandidate.hbm.xml | 18 + .../EntityMappings/Location.hbm.xml | 29 ++ .../EntityMappings/Password.hbm.xml | 20 + .../Persistence/EntityMappings/Person.hbm.xml | 60 +++ .../EntityMappings/PersonPhone.hbm.xml | 16 + .../EntityMappings/PhoneNumberType.hbm.xml | 21 + .../EntityMappings/Product.hbm.xml | 129 ++++++ .../EntityMappings/ProductCategory.hbm.xml | 22 + .../EntityMappings/ProductCostHistory.hbm.xml | 17 + .../EntityMappings/ProductDescription.hbm.xml | 22 + .../EntityMappings/ProductDocument.hbm.xml | 15 + .../EntityMappings/ProductInventory.hbm.xml | 19 + .../ProductListPriceHistory.hbm.xml | 17 + .../EntityMappings/ProductModel.hbm.xml | 36 ++ .../ProductModelIllustration.hbm.xml | 15 + ...ductModelProductDescriptionCulture.hbm.xml | 16 + .../EntityMappings/ProductPhoto.hbm.xml | 24 ++ .../ProductProductPhoto.hbm.xml | 16 + .../EntityMappings/ProductReview.hbm.xml | 22 + .../EntityMappings/ProductSubcategory.hbm.xml | 25 ++ .../EntityMappings/ProductVendor.hbm.xml | 25 ++ .../PurchaseOrderDetail.hbm.xml | 24 ++ .../PurchaseOrderHeader.hbm.xml | 37 ++ .../EntityMappings/SalesOrderDetail.hbm.xml | 24 ++ .../EntityMappings/SalesOrderHeader.hbm.xml | 66 +++ .../SalesOrderHeaderSalesReason.hbm.xml | 15 + .../EntityMappings/SalesPerson.hbm.xml | 50 +++ .../SalesPersonQuotaHistory.hbm.xml | 17 + .../EntityMappings/SalesReason.hbm.xml | 22 + .../EntityMappings/SalesTaxRate.hbm.xml | 21 + .../EntityMappings/SalesTerritory.hbm.xml | 54 +++ .../SalesTerritoryHistory.hbm.xml | 18 + .../EntityMappings/ScrapReason.hbm.xml | 21 + .../Persistence/EntityMappings/Shift.hbm.xml | 23 ++ .../EntityMappings/ShipMethod.hbm.xml | 30 ++ .../EntityMappings/ShoppingCartItem.hbm.xml | 20 + .../EntityMappings/SpecialOffer.hbm.xml | 29 ++ .../SpecialOfferProduct.hbm.xml | 23 ++ .../EntityMappings/StateProvince.hbm.xml | 36 ++ .../Persistence/EntityMappings/Store.hbm.xml | 29 ++ .../EntityMappings/TransactionHistory.hbm.xml | 23 ++ .../TransactionHistoryArchive.hbm.xml | 21 + .../EntityMappings/UnitMeasure.hbm.xml | 39 ++ .../Persistence/EntityMappings/Vendor.hbm.xml | 35 ++ .../EntityMappings/WorkOrder.hbm.xml | 32 ++ .../EntityMappings/WorkOrderRouting.hbm.xml | 26 ++ .../Persistence/NH.Bencher.Persistence.csproj | 271 +++++++++++++ .../Persistence/Properties/AssemblyInfo.cs | 24 ++ src/RawBencher/Persistence/SessionManager.cs | 131 ++++++ src/RawBencher/Persistence/app.config | 11 + src/RawBencher/Persistence/hibernate.cfg.xml | 10 + 146 files changed, 10607 insertions(+), 1 deletion(-) create mode 100644 src/NHibernate.Test/RawBenchSessionManagerPerfomance.cs create mode 100644 src/RawBencher/Model/EntityClasses/Address.cs create mode 100644 src/RawBencher/Model/EntityClasses/AddressType.cs create mode 100644 src/RawBencher/Model/EntityClasses/BillOfMaterial.cs create mode 100644 src/RawBencher/Model/EntityClasses/BusinessEntity.cs create mode 100644 src/RawBencher/Model/EntityClasses/BusinessEntityAddress.cs create mode 100644 src/RawBencher/Model/EntityClasses/BusinessEntityContact.cs create mode 100644 src/RawBencher/Model/EntityClasses/ContactCreditCard.cs create mode 100644 src/RawBencher/Model/EntityClasses/ContactType.cs create mode 100644 src/RawBencher/Model/EntityClasses/CountryRegion.cs create mode 100644 src/RawBencher/Model/EntityClasses/CountryRegionCurrency.cs create mode 100644 src/RawBencher/Model/EntityClasses/CreditCard.cs create mode 100644 src/RawBencher/Model/EntityClasses/Culture.cs create mode 100644 src/RawBencher/Model/EntityClasses/Currency.cs create mode 100644 src/RawBencher/Model/EntityClasses/CurrencyRate.cs create mode 100644 src/RawBencher/Model/EntityClasses/Customer.cs create mode 100644 src/RawBencher/Model/EntityClasses/Department.cs create mode 100644 src/RawBencher/Model/EntityClasses/Document.cs create mode 100644 src/RawBencher/Model/EntityClasses/EmailAddress.cs create mode 100644 src/RawBencher/Model/EntityClasses/Employee.cs create mode 100644 src/RawBencher/Model/EntityClasses/EmployeeDepartmentHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/EmployeePayHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/Illustration.cs create mode 100644 src/RawBencher/Model/EntityClasses/JobCandidate.cs create mode 100644 src/RawBencher/Model/EntityClasses/Location.cs create mode 100644 src/RawBencher/Model/EntityClasses/Password.cs create mode 100644 src/RawBencher/Model/EntityClasses/Person.cs create mode 100644 src/RawBencher/Model/EntityClasses/PersonPhone.cs create mode 100644 src/RawBencher/Model/EntityClasses/PhoneNumberType.cs create mode 100644 src/RawBencher/Model/EntityClasses/Product.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductCategory.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductCostHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductDescription.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductDocument.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductInventory.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductListPriceHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductModel.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductModelIllustration.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductModelProductDescriptionCulture.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductPhoto.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductProductPhoto.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductReview.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductSubcategory.cs create mode 100644 src/RawBencher/Model/EntityClasses/ProductVendor.cs create mode 100644 src/RawBencher/Model/EntityClasses/PurchaseOrderDetail.cs create mode 100644 src/RawBencher/Model/EntityClasses/PurchaseOrderHeader.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesOrderDetail.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesOrderHeader.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesOrderHeaderSalesReason.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesPerson.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesPersonQuotaHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesReason.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesTaxRate.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesTerritory.cs create mode 100644 src/RawBencher/Model/EntityClasses/SalesTerritoryHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/ScrapReason.cs create mode 100644 src/RawBencher/Model/EntityClasses/Shift.cs create mode 100644 src/RawBencher/Model/EntityClasses/ShipMethod.cs create mode 100644 src/RawBencher/Model/EntityClasses/ShoppingCartItem.cs create mode 100644 src/RawBencher/Model/EntityClasses/SpecialOffer.cs create mode 100644 src/RawBencher/Model/EntityClasses/SpecialOfferProduct.cs create mode 100644 src/RawBencher/Model/EntityClasses/StateProvince.cs create mode 100644 src/RawBencher/Model/EntityClasses/Store.cs create mode 100644 src/RawBencher/Model/EntityClasses/TransactionHistory.cs create mode 100644 src/RawBencher/Model/EntityClasses/TransactionHistoryArchive.cs create mode 100644 src/RawBencher/Model/EntityClasses/UnitMeasure.cs create mode 100644 src/RawBencher/Model/EntityClasses/Vendor.cs create mode 100644 src/RawBencher/Model/EntityClasses/WorkOrder.cs create mode 100644 src/RawBencher/Model/EntityClasses/WorkOrderRouting.cs create mode 100644 src/RawBencher/Model/NH.Bencher.Model.csproj create mode 100644 src/RawBencher/Model/Properties/AssemblyInfo.cs create mode 100644 src/RawBencher/Persistence/EntityMappings/Address.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/AddressType.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/BillOfMaterial.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/BusinessEntity.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/BusinessEntityAddress.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/BusinessEntityContact.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ContactCreditCard.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ContactType.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/CountryRegion.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/CountryRegionCurrency.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/CreditCard.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Culture.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Currency.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/CurrencyRate.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Customer.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Department.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Document.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/EmailAddress.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Employee.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/EmployeeDepartmentHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/EmployeePayHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Illustration.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/JobCandidate.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Location.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Password.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Person.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/PersonPhone.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/PhoneNumberType.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Product.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductCategory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductCostHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductDescription.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductDocument.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductInventory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductListPriceHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductModel.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductModelIllustration.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductModelProductDescriptionCulture.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductPhoto.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductProductPhoto.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductReview.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductSubcategory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ProductVendor.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/PurchaseOrderDetail.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/PurchaseOrderHeader.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesOrderDetail.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesOrderHeader.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesOrderHeaderSalesReason.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesPerson.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesPersonQuotaHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesReason.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesTaxRate.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesTerritory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SalesTerritoryHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ScrapReason.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Shift.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ShipMethod.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/ShoppingCartItem.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SpecialOffer.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/SpecialOfferProduct.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/StateProvince.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Store.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/TransactionHistory.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/TransactionHistoryArchive.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/UnitMeasure.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/Vendor.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/WorkOrder.hbm.xml create mode 100644 src/RawBencher/Persistence/EntityMappings/WorkOrderRouting.hbm.xml create mode 100644 src/RawBencher/Persistence/NH.Bencher.Persistence.csproj create mode 100644 src/RawBencher/Persistence/Properties/AssemblyInfo.cs create mode 100644 src/RawBencher/Persistence/SessionManager.cs create mode 100644 src/RawBencher/Persistence/app.config create mode 100644 src/RawBencher/Persistence/hibernate.cfg.xml diff --git a/src/NHibernate.Test/NHibernate.Test.csproj b/src/NHibernate.Test/NHibernate.Test.csproj index 11cc9888c37..18ff7ce1300 100644 --- a/src/NHibernate.Test/NHibernate.Test.csproj +++ b/src/NHibernate.Test/NHibernate.Test.csproj @@ -65,6 +65,8 @@ + + diff --git a/src/NHibernate.Test/RawBenchSessionManagerPerfomance.cs b/src/NHibernate.Test/RawBenchSessionManagerPerfomance.cs new file mode 100644 index 00000000000..12a6dc8ee4f --- /dev/null +++ b/src/NHibernate.Test/RawBenchSessionManagerPerfomance.cs @@ -0,0 +1,110 @@ +//#define UPSTREAM +using System; +using System.IO; +using NHibernate.Util; +using NUnit.Framework; + + +namespace NHibernate.Test +{ + [TestFixture] + public class RawBenchSessionManagerPerfomance + { +#if UPSTREAM + [Test] + public void InternLevel_Upstream() + { + //Just to force initialize static ctor and do not calculate memory consumed by Environoment + Cfg.Environment.VerifyProperties(CollectionHelper.EmptyDictionary()); + + RunTest(); + } + +#else + + [Test] + public void InternLevel_Minimal() + { + Cfg.Environment.InternLevel = InternLevel.Minimal; + RunTest(); + } + + [Test] + public void InternLevel_Default() + { + Cfg.Environment.InternLevel = InternLevel.Default; + RunTest(); + } + + [Test] + public void InternLevel_SessionFactories() + { + Cfg.Environment.InternLevel = InternLevel.SessionFactories; + RunTest(); + } + + [Test] + public void InternLevel_AppDomains() + { + Cfg.Environment.InternLevel = InternLevel.AppDomains; + RunTest(); + } + + +#endif + + private static void RunTest() + { + var factory = NH.Bencher.SessionManager.SessionFactory; + + var setup = new AppDomainSetup(); + var si = AppDomain.CurrentDomain.SetupInformation; + setup.ApplicationBase = si.ApplicationBase; + setup.ConfigurationFile = si.ConfigurationFile; + + AppDomain newDomain = AppDomain.CreateDomain("New Domain", null, si); + +#if !UPSTREAM + newDomain.SetData("internLevel", Cfg.Environment.InternLevel); +#endif + try + { + newDomain.DoCallBack( + () => + { + StringWriter s = new StringWriter(); + Console.SetOut(s); + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine("From new App Domain..."); +#if !UPSTREAM + Cfg.Environment.InternLevel = (InternLevel) AppDomain.CurrentDomain.GetData("internLevel"); +#endif + try + { + + var factory2 = NH.Bencher.SessionManager.SessionFactory; + } + finally + { + AppDomain.CurrentDomain.SetData("log", s.ToString()); + AppDomain.CurrentDomain.SetData("memory", NH.Bencher.SessionManager.LastTotalMemoryUsage); + } + }); + } + finally + { + Console.WriteLine(newDomain.GetData("log")); + Console.WriteLine("Total Memory Usage in 2 App Domains: " + ToKbSize((long) newDomain.GetData("memory") + NH.Bencher.SessionManager.LastTotalMemoryUsage)); + + AppDomain.Unload(newDomain); + } + } + + private static string ToKbSize(long bytes) + { + return (bytes / 1024.0).ToString("0,0.00") + " Kb"; + } + } + +} diff --git a/src/NHibernate.sln b/src/NHibernate.sln index d50878b114d..069eea00733 100644 --- a/src/NHibernate.sln +++ b/src/NHibernate.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.12 +VisualStudioVersion = 15.0.27130.2003 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{593DCEA7-C933-46F3-939F-D8172399AB05}" ProjectSection(SolutionItems) = preProject @@ -21,6 +21,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHibernate.TestDatabaseSetu EndProject Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "NHibernate.Test.VisualBasic", "NHibernate.Test.VisualBasic\NHibernate.Test.VisualBasic.vbproj", "{7C2EF610-BCA0-4D1F-898A-DE9908E4970C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NH.Bencher.Model", "RawBencher\Model\NH.Bencher.Model.csproj", "{45DAEB56-B84D-4D7A-BF22-293F1CE07DBB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NH.Bencher.Persistence", "RawBencher\Persistence\NH.Bencher.Persistence.csproj", "{3E9CA88C-03EC-445A-960A-242511B6EF55}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -47,6 +51,14 @@ Global {7C2EF610-BCA0-4D1F-898A-DE9908E4970C}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C2EF610-BCA0-4D1F-898A-DE9908E4970C}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C2EF610-BCA0-4D1F-898A-DE9908E4970C}.Release|Any CPU.Build.0 = Release|Any CPU + {45DAEB56-B84D-4D7A-BF22-293F1CE07DBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45DAEB56-B84D-4D7A-BF22-293F1CE07DBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45DAEB56-B84D-4D7A-BF22-293F1CE07DBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45DAEB56-B84D-4D7A-BF22-293F1CE07DBB}.Release|Any CPU.Build.0 = Release|Any CPU + {3E9CA88C-03EC-445A-960A-242511B6EF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E9CA88C-03EC-445A-960A-242511B6EF55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E9CA88C-03EC-445A-960A-242511B6EF55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E9CA88C-03EC-445A-960A-242511B6EF55}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/RawBencher/Model/EntityClasses/Address.cs b/src/RawBencher/Model/EntityClasses/Address.cs new file mode 100644 index 00000000000..9c22cf98e59 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Address.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Address' + public partial class Address + { + #region Class Member Declarations + private ISet _businessEntityAddresses; + private ISet _salesOrderHeaders; + private ISet _salesOrderHeaders1; + private StateProvince _stateProvince; + private System.Int32 _addressId; + private System.String _addressLine1; + private System.String _addressLine2; + private System.String _city; + private System.DateTime _modifiedDate; + private System.String _postalCode; + private System.Guid _rowguid; + private Microsoft.SqlServer.Types.SqlGeography _spatialLocation; + #endregion + + /// Initializes a new instance of the class. + public Address() : base() + { + _businessEntityAddresses = new HashSet(); + _salesOrderHeaders = new HashSet(); + _salesOrderHeaders1 = new HashSet(); + _addressId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.AddressId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Address toCompareWith = obj as Address; + return toCompareWith == null ? false : ((this.AddressId == toCompareWith.AddressId)); + } + + + #region Class Property Declarations + /// Gets the AddressId field. + public virtual System.Int32 AddressId + { + get { return _addressId; } + } + + /// Gets or sets the AddressLine1 field. + public virtual System.String AddressLine1 + { + get { return _addressLine1; } + set { _addressLine1 = value; } + } + + /// Gets or sets the AddressLine2 field. + public virtual System.String AddressLine2 + { + get { return _addressLine2; } + set { _addressLine2 = value; } + } + + /// Gets or sets the City field. + public virtual System.String City + { + get { return _city; } + set { _city = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the PostalCode field. + public virtual System.String PostalCode + { + get { return _postalCode; } + set { _postalCode = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the SpatialLocation field. + public virtual Microsoft.SqlServer.Types.SqlGeography SpatialLocation + { + get { return _spatialLocation; } + set { _spatialLocation = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.Address - Address.BusinessEntityAddresses (m:1)' + public virtual ISet BusinessEntityAddresses + { + get { return _businessEntityAddresses; } + set { _businessEntityAddresses = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Address - Address.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Address1 - Address.SalesOrderHeaders1 (m:1)' + public virtual ISet SalesOrderHeaders1 + { + get { return _salesOrderHeaders1; } + set { _salesOrderHeaders1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'Address.StateProvince - StateProvince.Addresses (m:1)' + public virtual StateProvince StateProvince + { + get { return _stateProvince; } + set { _stateProvince = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/AddressType.cs b/src/RawBencher/Model/EntityClasses/AddressType.cs new file mode 100644 index 00000000000..87567f5626d --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/AddressType.cs @@ -0,0 +1,92 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'AddressType' + public partial class AddressType + { + #region Class Member Declarations + private ISet _businessEntityAddresses; + private System.Int32 _addressTypeId; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public AddressType() : base() + { + _businessEntityAddresses = new HashSet(); + _addressTypeId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.AddressTypeId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + AddressType toCompareWith = obj as AddressType; + return toCompareWith == null ? false : ((this.AddressTypeId == toCompareWith.AddressTypeId)); + } + + + #region Class Property Declarations + /// Gets the AddressTypeId field. + public virtual System.Int32 AddressTypeId + { + get { return _addressTypeId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.AddressType - AddressType.BusinessEntityAddresses (m:1)' + public virtual ISet BusinessEntityAddresses + { + get { return _businessEntityAddresses; } + set { _businessEntityAddresses = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/BillOfMaterial.cs b/src/RawBencher/Model/EntityClasses/BillOfMaterial.cs new file mode 100644 index 00000000000..51019d3d68f --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/BillOfMaterial.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'BillOfMaterial' + public partial class BillOfMaterial + { + #region Class Member Declarations + private Product _product; + private Product _product1; + private UnitMeasure _unitMeasure; + private System.Int32 _billOfMaterialsId; + private System.Int16 _bomlevel; + private Nullable _endDate; + private System.DateTime _modifiedDate; + private System.Decimal _perAssemblyQty; + private System.DateTime _startDate; + #endregion + + /// Initializes a new instance of the class. + public BillOfMaterial() : base() + { + _billOfMaterialsId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.BillOfMaterialsId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + BillOfMaterial toCompareWith = obj as BillOfMaterial; + return toCompareWith == null ? false : ((this.BillOfMaterialsId == toCompareWith.BillOfMaterialsId)); + } + + + #region Class Property Declarations + /// Gets the BillOfMaterialsId field. + public virtual System.Int32 BillOfMaterialsId + { + get { return _billOfMaterialsId; } + } + + /// Gets or sets the Bomlevel field. + public virtual System.Int16 Bomlevel + { + get { return _bomlevel; } + set { _bomlevel = value; } + } + + /// Gets or sets the EndDate field. + public virtual Nullable EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the PerAssemblyQty field. + public virtual System.Decimal PerAssemblyQty + { + get { return _perAssemblyQty; } + set { _perAssemblyQty = value; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'BillOfMaterial.Product - Product.BillOfMaterials (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + /// Represents the navigator which is mapped onto the association 'BillOfMaterial.Product1 - Product.BillOfMaterials1 (m:1)' + public virtual Product Product1 + { + get { return _product1; } + set { _product1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'BillOfMaterial.UnitMeasure - UnitMeasure.BillOfMaterials (m:1)' + public virtual UnitMeasure UnitMeasure + { + get { return _unitMeasure; } + set { _unitMeasure = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/BusinessEntity.cs b/src/RawBencher/Model/EntityClasses/BusinessEntity.cs new file mode 100644 index 00000000000..777f1d8f557 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/BusinessEntity.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'BusinessEntity' + public partial class BusinessEntity + { + #region Class Member Declarations + private ISet _businessEntityAddresses; + private ISet _businessEntityContacts; + private Person _person; + private Store _store; + private Vendor _vendor; + private System.Int32 _businessEntityId; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public BusinessEntity() : base() + { + _businessEntityAddresses = new HashSet(); + _businessEntityContacts = new HashSet(); + _businessEntityId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.BusinessEntityId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + BusinessEntity toCompareWith = obj as BusinessEntity; + return toCompareWith == null ? false : ((this.BusinessEntityId == toCompareWith.BusinessEntityId)); + } + + + #region Class Property Declarations + /// Gets the BusinessEntityId field. + public virtual System.Int32 BusinessEntityId + { + get { return _businessEntityId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.BusinessEntity - BusinessEntity.BusinessEntityAddresses (m:1)' + public virtual ISet BusinessEntityAddresses + { + get { return _businessEntityAddresses; } + set { _businessEntityAddresses = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.BusinessEntity - BusinessEntity.BusinessEntityContacts (m:1)' + public virtual ISet BusinessEntityContacts + { + get { return _businessEntityContacts; } + set { _businessEntityContacts = value; } + } + + /// Represents the navigator which is mapped onto the association 'Person.BusinessEntity - BusinessEntity.Person (1:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + /// Represents the navigator which is mapped onto the association 'Store.BusinessEntity - BusinessEntity.Store (1:1)' + public virtual Store Store + { + get { return _store; } + set { _store = value; } + } + + /// Represents the navigator which is mapped onto the association 'Vendor.BusinessEntity - BusinessEntity.Vendor (1:1)' + public virtual Vendor Vendor + { + get { return _vendor; } + set { _vendor = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/BusinessEntityAddress.cs b/src/RawBencher/Model/EntityClasses/BusinessEntityAddress.cs new file mode 100644 index 00000000000..e9965e4b9c5 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/BusinessEntityAddress.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'BusinessEntityAddress' + public partial class BusinessEntityAddress + { + #region Class Member Declarations + private Address _address; + private AddressType _addressType; + private BusinessEntity _businessEntity; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public BusinessEntityAddress() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.Address - Address.BusinessEntityAddresses (m:1)' + public virtual Address Address + { + get { return _address; } + set { _address = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.AddressType - AddressType.BusinessEntityAddresses (m:1)' + public virtual AddressType AddressType + { + get { return _addressType; } + set { _addressType = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.BusinessEntity - BusinessEntity.BusinessEntityAddresses (m:1)' + public virtual BusinessEntity BusinessEntity + { + get { return _businessEntity; } + set { _businessEntity = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/BusinessEntityContact.cs b/src/RawBencher/Model/EntityClasses/BusinessEntityContact.cs new file mode 100644 index 00000000000..8313833ac1e --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/BusinessEntityContact.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'BusinessEntityContact' + public partial class BusinessEntityContact + { + #region Class Member Declarations + private BusinessEntity _businessEntity; + private ContactType _contactType; + private Person _person; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public BusinessEntityContact() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.BusinessEntity - BusinessEntity.BusinessEntityContacts (m:1)' + public virtual BusinessEntity BusinessEntity + { + get { return _businessEntity; } + set { _businessEntity = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.ContactType - ContactType.BusinessEntityContacts (m:1)' + public virtual ContactType ContactType + { + get { return _contactType; } + set { _contactType = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.Person - Person.BusinessEntityContacts (m:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ContactCreditCard.cs b/src/RawBencher/Model/EntityClasses/ContactCreditCard.cs new file mode 100644 index 00000000000..c60c66959b3 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ContactCreditCard.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ContactCreditCard' + public partial class ContactCreditCard + { + #region Class Member Declarations + private CreditCard _creditCard; + private Person _person; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public ContactCreditCard() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ContactCreditCard.CreditCard - CreditCard.ContactCreditCards (m:1)' + public virtual CreditCard CreditCard + { + get { return _creditCard; } + set { _creditCard = value; } + } + + /// Represents the navigator which is mapped onto the association 'ContactCreditCard.Person - Person.ContactCreditCards (m:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ContactType.cs b/src/RawBencher/Model/EntityClasses/ContactType.cs new file mode 100644 index 00000000000..627ff11b2e7 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ContactType.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ContactType' + public partial class ContactType + { + #region Class Member Declarations + private ISet _businessEntityContacts; + private System.Int32 _contactTypeId; + private System.DateTime _modifiedDate; + private System.String _name; + #endregion + + /// Initializes a new instance of the class. + public ContactType() : base() + { + _businessEntityContacts = new HashSet(); + _contactTypeId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ContactTypeId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ContactType toCompareWith = obj as ContactType; + return toCompareWith == null ? false : ((this.ContactTypeId == toCompareWith.ContactTypeId)); + } + + + #region Class Property Declarations + /// Gets the ContactTypeId field. + public virtual System.Int32 ContactTypeId + { + get { return _contactTypeId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.ContactType - ContactType.BusinessEntityContacts (m:1)' + public virtual ISet BusinessEntityContacts + { + get { return _businessEntityContacts; } + set { _businessEntityContacts = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/CountryRegion.cs b/src/RawBencher/Model/EntityClasses/CountryRegion.cs new file mode 100644 index 00000000000..1b610ad86c2 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/CountryRegion.cs @@ -0,0 +1,102 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'CountryRegion' + public partial class CountryRegion + { + #region Class Member Declarations + private ISet _countryRegionCurrencies; + private ISet _salesTerritories; + private ISet _stateProvinces; + private System.String _countryRegionCode; + private System.DateTime _modifiedDate; + private System.String _name; + #endregion + + /// Initializes a new instance of the class. + public CountryRegion() : base() + { + _countryRegionCurrencies = new HashSet(); + _salesTerritories = new HashSet(); + _stateProvinces = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CountryRegionCode.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + CountryRegion toCompareWith = obj as CountryRegion; + return toCompareWith == null ? false : ((this.CountryRegionCode == toCompareWith.CountryRegionCode)); + } + + + #region Class Property Declarations + /// Gets or sets the CountryRegionCode field. + public virtual System.String CountryRegionCode + { + get { return _countryRegionCode; } + set { _countryRegionCode = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.CountryRegion - CountryRegion.CountryRegionCurrencies (m:1)' + public virtual ISet CountryRegionCurrencies + { + get { return _countryRegionCurrencies; } + set { _countryRegionCurrencies = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTerritory.CountryRegion - CountryRegion.SalesTerritories (m:1)' + public virtual ISet SalesTerritories + { + get { return _salesTerritories; } + set { _salesTerritories = value; } + } + + /// Represents the navigator which is mapped onto the association 'StateProvince.CountryRegion - CountryRegion.StateProvinces (m:1)' + public virtual ISet StateProvinces + { + get { return _stateProvinces; } + set { _stateProvinces = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/CountryRegionCurrency.cs b/src/RawBencher/Model/EntityClasses/CountryRegionCurrency.cs new file mode 100644 index 00000000000..a02d1f54e3b --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/CountryRegionCurrency.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'CountryRegionCurrency' + public partial class CountryRegionCurrency + { + #region Class Member Declarations + private CountryRegion _countryRegion; + private Currency _currency; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public CountryRegionCurrency() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.CountryRegion - CountryRegion.CountryRegionCurrencies (m:1)' + public virtual CountryRegion CountryRegion + { + get { return _countryRegion; } + set { _countryRegion = value; } + } + + /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.Currency - Currency.CountryRegionCurrencies (m:1)' + public virtual Currency Currency + { + get { return _currency; } + set { _currency = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/CreditCard.cs b/src/RawBencher/Model/EntityClasses/CreditCard.cs new file mode 100644 index 00000000000..a94c66ad817 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/CreditCard.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'CreditCard' + public partial class CreditCard + { + #region Class Member Declarations + private ISet _contactCreditCards; + private ISet _salesOrderHeaders; + private System.String _cardNumber; + private System.String _cardType; + private System.Int32 _creditCardId; + private System.Byte _expMonth; + private System.Int16 _expYear; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public CreditCard() : base() + { + _contactCreditCards = new HashSet(); + _salesOrderHeaders = new HashSet(); + _creditCardId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CreditCardId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + CreditCard toCompareWith = obj as CreditCard; + return toCompareWith == null ? false : ((this.CreditCardId == toCompareWith.CreditCardId)); + } + + + #region Class Property Declarations + /// Gets or sets the CardNumber field. + public virtual System.String CardNumber + { + get { return _cardNumber; } + set { _cardNumber = value; } + } + + /// Gets or sets the CardType field. + public virtual System.String CardType + { + get { return _cardType; } + set { _cardType = value; } + } + + /// Gets the CreditCardId field. + public virtual System.Int32 CreditCardId + { + get { return _creditCardId; } + } + + /// Gets or sets the ExpMonth field. + public virtual System.Byte ExpMonth + { + get { return _expMonth; } + set { _expMonth = value; } + } + + /// Gets or sets the ExpYear field. + public virtual System.Int16 ExpYear + { + get { return _expYear; } + set { _expYear = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ContactCreditCard.CreditCard - CreditCard.ContactCreditCards (m:1)' + public virtual ISet ContactCreditCards + { + get { return _contactCreditCards; } + set { _contactCreditCards = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.CreditCard - CreditCard.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Culture.cs b/src/RawBencher/Model/EntityClasses/Culture.cs new file mode 100644 index 00000000000..24d19aea197 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Culture.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Culture' + public partial class Culture + { + #region Class Member Declarations + private ISet _productModelProductDescriptionCultures; + private System.String _cultureId; + private System.DateTime _modifiedDate; + private System.String _name; + #endregion + + /// Initializes a new instance of the class. + public Culture() : base() + { + _productModelProductDescriptionCultures = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CultureId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Culture toCompareWith = obj as Culture; + return toCompareWith == null ? false : ((this.CultureId == toCompareWith.CultureId)); + } + + + #region Class Property Declarations + /// Gets or sets the CultureId field. + public virtual System.String CultureId + { + get { return _cultureId; } + set { _cultureId = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.Culture - Culture.ProductModelProductDescriptionCultures (m:1)' + public virtual ISet ProductModelProductDescriptionCultures + { + get { return _productModelProductDescriptionCultures; } + set { _productModelProductDescriptionCultures = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Currency.cs b/src/RawBencher/Model/EntityClasses/Currency.cs new file mode 100644 index 00000000000..3a4e52370d4 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Currency.cs @@ -0,0 +1,102 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Currency' + public partial class Currency + { + #region Class Member Declarations + private ISet _countryRegionCurrencies; + private ISet _currencyRates; + private ISet _currencyRates1; + private System.String _currencyCode; + private System.DateTime _modifiedDate; + private System.String _name; + #endregion + + /// Initializes a new instance of the class. + public Currency() : base() + { + _countryRegionCurrencies = new HashSet(); + _currencyRates = new HashSet(); + _currencyRates1 = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CurrencyCode.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Currency toCompareWith = obj as Currency; + return toCompareWith == null ? false : ((this.CurrencyCode == toCompareWith.CurrencyCode)); + } + + + #region Class Property Declarations + /// Gets or sets the CurrencyCode field. + public virtual System.String CurrencyCode + { + get { return _currencyCode; } + set { _currencyCode = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.Currency - Currency.CountryRegionCurrencies (m:1)' + public virtual ISet CountryRegionCurrencies + { + get { return _countryRegionCurrencies; } + set { _countryRegionCurrencies = value; } + } + + /// Represents the navigator which is mapped onto the association 'CurrencyRate.Currency - Currency.CurrencyRates (m:1)' + public virtual ISet CurrencyRates + { + get { return _currencyRates; } + set { _currencyRates = value; } + } + + /// Represents the navigator which is mapped onto the association 'CurrencyRate.Currency1 - Currency.CurrencyRates1 (m:1)' + public virtual ISet CurrencyRates1 + { + get { return _currencyRates1; } + set { _currencyRates1 = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/CurrencyRate.cs b/src/RawBencher/Model/EntityClasses/CurrencyRate.cs new file mode 100644 index 00000000000..5b2ddae8efe --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/CurrencyRate.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'CurrencyRate' + public partial class CurrencyRate + { + #region Class Member Declarations + private Currency _currency; + private Currency _currency1; + private ISet _salesOrderHeaders; + private System.Decimal _averageRate; + private System.DateTime _currencyRateDate; + private System.Int32 _currencyRateId; + private System.Decimal _endOfDayRate; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public CurrencyRate() : base() + { + _salesOrderHeaders = new HashSet(); + _currencyRateId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CurrencyRateId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + CurrencyRate toCompareWith = obj as CurrencyRate; + return toCompareWith == null ? false : ((this.CurrencyRateId == toCompareWith.CurrencyRateId)); + } + + + #region Class Property Declarations + /// Gets or sets the AverageRate field. + public virtual System.Decimal AverageRate + { + get { return _averageRate; } + set { _averageRate = value; } + } + + /// Gets or sets the CurrencyRateDate field. + public virtual System.DateTime CurrencyRateDate + { + get { return _currencyRateDate; } + set { _currencyRateDate = value; } + } + + /// Gets the CurrencyRateId field. + public virtual System.Int32 CurrencyRateId + { + get { return _currencyRateId; } + } + + /// Gets or sets the EndOfDayRate field. + public virtual System.Decimal EndOfDayRate + { + get { return _endOfDayRate; } + set { _endOfDayRate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'CurrencyRate.Currency - Currency.CurrencyRates (m:1)' + public virtual Currency Currency + { + get { return _currency; } + set { _currency = value; } + } + + /// Represents the navigator which is mapped onto the association 'CurrencyRate.Currency1 - Currency.CurrencyRates1 (m:1)' + public virtual Currency Currency1 + { + get { return _currency1; } + set { _currency1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.CurrencyRate - CurrencyRate.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Customer.cs b/src/RawBencher/Model/EntityClasses/Customer.cs new file mode 100644 index 00000000000..d9725dfb812 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Customer.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Customer' + public partial class Customer + { + #region Class Member Declarations + private Person _person; + private ISet _salesOrderHeaders; + private SalesTerritory _salesTerritory; + private Store _store; + private System.String _accountNumber; + private System.Int32 _customerId; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public Customer() : base() + { + _salesOrderHeaders = new HashSet(); + _accountNumber = default(System.String); + _customerId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CustomerId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Customer toCompareWith = obj as Customer; + return toCompareWith == null ? false : ((this.CustomerId == toCompareWith.CustomerId)); + } + + + #region Class Property Declarations + /// Gets the AccountNumber field. + public virtual System.String AccountNumber + { + get { return _accountNumber; } + } + + /// Gets the CustomerId field. + public virtual System.Int32 CustomerId + { + get { return _customerId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'Customer.Person - Person.Customers (m:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Customer - Customer.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + /// Represents the navigator which is mapped onto the association 'Customer.SalesTerritory - SalesTerritory.Customers (m:1)' + public virtual SalesTerritory SalesTerritory + { + get { return _salesTerritory; } + set { _salesTerritory = value; } + } + + /// Represents the navigator which is mapped onto the association 'Customer.Store - Store.Customers (m:1)' + public virtual Store Store + { + get { return _store; } + set { _store = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Department.cs b/src/RawBencher/Model/EntityClasses/Department.cs new file mode 100644 index 00000000000..1fd9dede3d7 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Department.cs @@ -0,0 +1,92 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Department' + public partial class Department + { + #region Class Member Declarations + private ISet _employeeDepartmentHistories; + private System.Int16 _departmentId; + private System.String _groupName; + private System.DateTime _modifiedDate; + private System.String _name; + #endregion + + /// Initializes a new instance of the class. + public Department() : base() + { + _employeeDepartmentHistories = new HashSet(); + _departmentId = default(System.Int16); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.DepartmentId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Department toCompareWith = obj as Department; + return toCompareWith == null ? false : ((this.DepartmentId == toCompareWith.DepartmentId)); + } + + + #region Class Property Declarations + /// Gets the DepartmentId field. + public virtual System.Int16 DepartmentId + { + get { return _departmentId; } + } + + /// Gets or sets the GroupName field. + public virtual System.String GroupName + { + get { return _groupName; } + set { _groupName = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeeDepartmentHistory.Department - Department.EmployeeDepartmentHistories (m:1)' + public virtual ISet EmployeeDepartmentHistories + { + get { return _employeeDepartmentHistories; } + set { _employeeDepartmentHistories = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Document.cs b/src/RawBencher/Model/EntityClasses/Document.cs new file mode 100644 index 00000000000..affb5ba19f9 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Document.cs @@ -0,0 +1,172 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Document' + public partial class Document + { + #region Class Member Declarations + private Employee _employee; + private ISet _productDocuments; + private System.Int32 _changeNumber; + private System.Byte[] _documentData; + private Nullable _documentLevel; + private System.String _documentNode; + private System.String _documentSummary; + private System.String _fileExtension; + private System.String _fileName; + private System.Boolean _folderFlag; + private System.DateTime _modifiedDate; + private System.String _revision; + private System.Guid _rowguid; + private System.Byte _status; + private System.String _title; + #endregion + + /// Initializes a new instance of the class. + public Document() : base() + { + _productDocuments = new HashSet(); + _documentLevel = default(Nullable); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.DocumentNode.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Document toCompareWith = obj as Document; + return toCompareWith == null ? false : ((this.DocumentNode == toCompareWith.DocumentNode)); + } + + + #region Class Property Declarations + /// Gets or sets the ChangeNumber field. + public virtual System.Int32 ChangeNumber + { + get { return _changeNumber; } + set { _changeNumber = value; } + } + + /// Gets or sets the DocumentData field. + public virtual System.Byte[] DocumentData + { + get { return _documentData; } + set { _documentData = value; } + } + + /// Gets the DocumentLevel field. + public virtual Nullable DocumentLevel + { + get { return _documentLevel; } + } + + /// Gets or sets the DocumentNode field. + public virtual System.String DocumentNode + { + get { return _documentNode; } + set { _documentNode = value; } + } + + /// Gets or sets the DocumentSummary field. + public virtual System.String DocumentSummary + { + get { return _documentSummary; } + set { _documentSummary = value; } + } + + /// Gets or sets the FileExtension field. + public virtual System.String FileExtension + { + get { return _fileExtension; } + set { _fileExtension = value; } + } + + /// Gets or sets the FileName field. + public virtual System.String FileName + { + get { return _fileName; } + set { _fileName = value; } + } + + /// Gets or sets the FolderFlag field. + public virtual System.Boolean FolderFlag + { + get { return _folderFlag; } + set { _folderFlag = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Revision field. + public virtual System.String Revision + { + get { return _revision; } + set { _revision = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the Status field. + public virtual System.Byte Status + { + get { return _status; } + set { _status = value; } + } + + /// Gets or sets the Title field. + public virtual System.String Title + { + get { return _title; } + set { _title = value; } + } + + /// Represents the navigator which is mapped onto the association 'Document.Employee - Employee.Documents (m:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductDocument.Document - Document.ProductDocuments (m:1)' + public virtual ISet ProductDocuments + { + get { return _productDocuments; } + set { _productDocuments = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/EmailAddress.cs b/src/RawBencher/Model/EntityClasses/EmailAddress.cs new file mode 100644 index 00000000000..0b0166c8136 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/EmailAddress.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'EmailAddress' + public partial class EmailAddress + { + #region Class Member Declarations + private Person _person; + private System.Int32 _emailAddressId; + private System.String _emailAddressValue; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public EmailAddress() : base() + { + _emailAddressId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets the EmailAddressId field. + public virtual System.Int32 EmailAddressId + { + get { return _emailAddressId; } + } + + /// Gets or sets the EmailAddressValue field. + public virtual System.String EmailAddressValue + { + get { return _emailAddressValue; } + set { _emailAddressValue = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmailAddress.Person - Person.EmailAddresses (m:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Employee.cs b/src/RawBencher/Model/EntityClasses/Employee.cs new file mode 100644 index 00000000000..b92bd0a157e --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Employee.cs @@ -0,0 +1,235 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Employee' + public partial class Employee + { + #region Class Member Declarations + private ISet _documents; + private ISet _employeeDepartmentHistories; + private ISet _employeePayHistories; + private ISet _jobCandidates; + private Person _person; + private ISet _purchaseOrderHeaders; + private SalesPerson _salesPerson; + private System.DateTime _birthDate; + private System.Boolean _currentFlag; + private System.Int32 _employeeId; + private System.String _gender; + private System.DateTime _hireDate; + private System.String _loginId; + private System.String _maritalStatus; + private System.DateTime _modifiedDate; + private System.String _nationalIdnumber; + private Nullable _organizationLevel; + private System.String _organizationNode; + private System.Guid _rowguid; + private System.Boolean _salariedFlag; + private System.Int16 _sickLeaveHours; + private System.String _title; + private System.Int16 _vacationHours; + #endregion + + /// Initializes a new instance of the class. + public Employee() : base() + { + _documents = new HashSet(); + _employeeDepartmentHistories = new HashSet(); + _employeePayHistories = new HashSet(); + _jobCandidates = new HashSet(); + _purchaseOrderHeaders = new HashSet(); + _employeeId = default(System.Int32); + _organizationLevel = default(Nullable); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.EmployeeId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the BirthDate field. + public virtual System.DateTime BirthDate + { + get { return _birthDate; } + set { _birthDate = value; } + } + + /// Gets or sets the CurrentFlag field. + public virtual System.Boolean CurrentFlag + { + get { return _currentFlag; } + set { _currentFlag = value; } + } + + /// Gets the EmployeeId field. + public virtual System.Int32 EmployeeId + { + get { return _employeeId; } + } + + /// Gets or sets the Gender field. + public virtual System.String Gender + { + get { return _gender; } + set { _gender = value; } + } + + /// Gets or sets the HireDate field. + public virtual System.DateTime HireDate + { + get { return _hireDate; } + set { _hireDate = value; } + } + + /// Gets or sets the LoginId field. + public virtual System.String LoginId + { + get { return _loginId; } + set { _loginId = value; } + } + + /// Gets or sets the MaritalStatus field. + public virtual System.String MaritalStatus + { + get { return _maritalStatus; } + set { _maritalStatus = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the NationalIdnumber field. + public virtual System.String NationalIdnumber + { + get { return _nationalIdnumber; } + set { _nationalIdnumber = value; } + } + + /// Gets the OrganizationLevel field. + public virtual Nullable OrganizationLevel + { + get { return _organizationLevel; } + } + + /// Gets or sets the OrganizationNode field. + public virtual System.String OrganizationNode + { + get { return _organizationNode; } + set { _organizationNode = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the SalariedFlag field. + public virtual System.Boolean SalariedFlag + { + get { return _salariedFlag; } + set { _salariedFlag = value; } + } + + /// Gets or sets the SickLeaveHours field. + public virtual System.Int16 SickLeaveHours + { + get { return _sickLeaveHours; } + set { _sickLeaveHours = value; } + } + + /// Gets or sets the Title field. + public virtual System.String Title + { + get { return _title; } + set { _title = value; } + } + + /// Gets or sets the VacationHours field. + public virtual System.Int16 VacationHours + { + get { return _vacationHours; } + set { _vacationHours = value; } + } + + /// Represents the navigator which is mapped onto the association 'Document.Employee - Employee.Documents (m:1)' + public virtual ISet Documents + { + get { return _documents; } + set { _documents = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeeDepartmentHistory.Employee - Employee.EmployeeDepartmentHistories (m:1)' + public virtual ISet EmployeeDepartmentHistories + { + get { return _employeeDepartmentHistories; } + set { _employeeDepartmentHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeePayHistory.Employee - Employee.EmployeePayHistories (m:1)' + public virtual ISet EmployeePayHistories + { + get { return _employeePayHistories; } + set { _employeePayHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'JobCandidate.Employee - Employee.JobCandidates (m:1)' + public virtual ISet JobCandidates + { + get { return _jobCandidates; } + set { _jobCandidates = value; } + } + + /// Represents the navigator which is mapped onto the association 'Employee.Person - Person.Employee (1:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderHeader.Employee - Employee.PurchaseOrderHeaders (m:1)' + public virtual ISet PurchaseOrderHeaders + { + get { return _purchaseOrderHeaders; } + set { _purchaseOrderHeaders = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesPerson.Employee - Employee.SalesPerson (1:1)' + public virtual SalesPerson SalesPerson + { + get { return _salesPerson; } + set { _salesPerson = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/EmployeeDepartmentHistory.cs b/src/RawBencher/Model/EntityClasses/EmployeeDepartmentHistory.cs new file mode 100644 index 00000000000..f365f064efc --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/EmployeeDepartmentHistory.cs @@ -0,0 +1,93 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'EmployeeDepartmentHistory' + public partial class EmployeeDepartmentHistory + { + #region Class Member Declarations + private Department _department; + private Employee _employee; + private Shift _shift; + private Nullable _endDate; + private System.DateTime _modifiedDate; + private System.DateTime _startDate; + #endregion + + /// Initializes a new instance of the class. + public EmployeeDepartmentHistory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the EndDate field. + public virtual Nullable EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeeDepartmentHistory.Department - Department.EmployeeDepartmentHistories (m:1)' + public virtual Department Department + { + get { return _department; } + set { _department = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeeDepartmentHistory.Employee - Employee.EmployeeDepartmentHistories (m:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeeDepartmentHistory.Shift - Shift.EmployeeDepartmentHistories (m:1)' + public virtual Shift Shift + { + get { return _shift; } + set { _shift = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/EmployeePayHistory.cs b/src/RawBencher/Model/EntityClasses/EmployeePayHistory.cs new file mode 100644 index 00000000000..86c2f092d11 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/EmployeePayHistory.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'EmployeePayHistory' + public partial class EmployeePayHistory + { + #region Class Member Declarations + private Employee _employee; + private System.DateTime _modifiedDate; + private System.Byte _payFrequency; + private System.Decimal _rate; + private System.DateTime _rateChangeDate; + #endregion + + /// Initializes a new instance of the class. + public EmployeePayHistory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the PayFrequency field. + public virtual System.Byte PayFrequency + { + get { return _payFrequency; } + set { _payFrequency = value; } + } + + /// Gets or sets the Rate field. + public virtual System.Decimal Rate + { + get { return _rate; } + set { _rate = value; } + } + + /// Gets or sets the RateChangeDate field. + public virtual System.DateTime RateChangeDate + { + get { return _rateChangeDate; } + set { _rateChangeDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeePayHistory.Employee - Employee.EmployeePayHistories (m:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Illustration.cs b/src/RawBencher/Model/EntityClasses/Illustration.cs new file mode 100644 index 00000000000..85dda6c4bf7 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Illustration.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Illustration' + public partial class Illustration + { + #region Class Member Declarations + private ISet _productModelIllustrations; + private System.String _diagram; + private System.Int32 _illustrationId; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public Illustration() : base() + { + _productModelIllustrations = new HashSet(); + _illustrationId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.IllustrationId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Illustration toCompareWith = obj as Illustration; + return toCompareWith == null ? false : ((this.IllustrationId == toCompareWith.IllustrationId)); + } + + + #region Class Property Declarations + /// Gets or sets the Diagram field. + public virtual System.String Diagram + { + get { return _diagram; } + set { _diagram = value; } + } + + /// Gets the IllustrationId field. + public virtual System.Int32 IllustrationId + { + get { return _illustrationId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelIllustration.Illustration - Illustration.ProductModelIllustrations (m:1)' + public virtual ISet ProductModelIllustrations + { + get { return _productModelIllustrations; } + set { _productModelIllustrations = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/JobCandidate.cs b/src/RawBencher/Model/EntityClasses/JobCandidate.cs new file mode 100644 index 00000000000..2e2b1a8151b --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/JobCandidate.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'JobCandidate' + public partial class JobCandidate + { + #region Class Member Declarations + private Employee _employee; + private System.Int32 _jobCandidateId; + private System.DateTime _modifiedDate; + private System.String _resume; + #endregion + + /// Initializes a new instance of the class. + public JobCandidate() : base() + { + _jobCandidateId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.JobCandidateId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + JobCandidate toCompareWith = obj as JobCandidate; + return toCompareWith == null ? false : ((this.JobCandidateId == toCompareWith.JobCandidateId)); + } + + + #region Class Property Declarations + /// Gets the JobCandidateId field. + public virtual System.Int32 JobCandidateId + { + get { return _jobCandidateId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Resume field. + public virtual System.String Resume + { + get { return _resume; } + set { _resume = value; } + } + + /// Represents the navigator which is mapped onto the association 'JobCandidate.Employee - Employee.JobCandidates (m:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Location.cs b/src/RawBencher/Model/EntityClasses/Location.cs new file mode 100644 index 00000000000..22525e2f8ef --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Location.cs @@ -0,0 +1,109 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Location' + public partial class Location + { + #region Class Member Declarations + private ISet _productInventories; + private ISet _workOrderRoutings; + private System.Decimal _availability; + private System.Decimal _costRate; + private System.Int16 _locationId; + private System.DateTime _modifiedDate; + private System.String _name; + #endregion + + /// Initializes a new instance of the class. + public Location() : base() + { + _productInventories = new HashSet(); + _workOrderRoutings = new HashSet(); + _locationId = default(System.Int16); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.LocationId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Location toCompareWith = obj as Location; + return toCompareWith == null ? false : ((this.LocationId == toCompareWith.LocationId)); + } + + + #region Class Property Declarations + /// Gets or sets the Availability field. + public virtual System.Decimal Availability + { + get { return _availability; } + set { _availability = value; } + } + + /// Gets or sets the CostRate field. + public virtual System.Decimal CostRate + { + get { return _costRate; } + set { _costRate = value; } + } + + /// Gets the LocationId field. + public virtual System.Int16 LocationId + { + get { return _locationId; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductInventory.Location - Location.ProductInventories (m:1)' + public virtual ISet ProductInventories + { + get { return _productInventories; } + set { _productInventories = value; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrderRouting.Location - Location.WorkOrderRoutings (m:1)' + public virtual ISet WorkOrderRoutings + { + get { return _workOrderRoutings; } + set { _workOrderRoutings = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Password.cs b/src/RawBencher/Model/EntityClasses/Password.cs new file mode 100644 index 00000000000..d0919a541a9 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Password.cs @@ -0,0 +1,94 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Password' + public partial class Password + { + #region Class Member Declarations + private Person _person; + private System.Int32 _businessEntityId; + private System.DateTime _modifiedDate; + private System.String _passwordHash; + private System.String _passwordSalt; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public Password() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.BusinessEntityId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the BusinessEntityId field. + public virtual System.Int32 BusinessEntityId + { + get { return _businessEntityId; } + set { _businessEntityId = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the PasswordHash field. + public virtual System.String PasswordHash + { + get { return _passwordHash; } + set { _passwordHash = value; } + } + + /// Gets or sets the PasswordSalt field. + public virtual System.String PasswordSalt + { + get { return _passwordSalt; } + set { _passwordSalt = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'Password.Person - Person.Password (1:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Person.cs b/src/RawBencher/Model/EntityClasses/Person.cs new file mode 100644 index 00000000000..ce07400c4de --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Person.cs @@ -0,0 +1,219 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Person' + public partial class Person + { + #region Class Member Declarations + private BusinessEntity _businessEntity; + private ISet _businessEntityContacts; + private ISet _contactCreditCards; + private ISet _customers; + private ISet _emailAddresses; + private Employee _employee; + private Password _password; + private ISet _personPhones; + private System.String _additionalContactInfo; + private System.Int32 _businessEntityId; + private System.String _demographics; + private System.Int32 _emailPromotion; + private System.String _firstName; + private System.String _lastName; + private System.String _middleName; + private System.DateTime _modifiedDate; + private System.Boolean _nameStyle; + private System.String _personType; + private System.Guid _rowguid; + private System.String _suffix; + private System.String _title; + #endregion + + /// Initializes a new instance of the class. + public Person() : base() + { + _businessEntityContacts = new HashSet(); + _contactCreditCards = new HashSet(); + _customers = new HashSet(); + _emailAddresses = new HashSet(); + _personPhones = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.BusinessEntityId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the AdditionalContactInfo field. + public virtual System.String AdditionalContactInfo + { + get { return _additionalContactInfo; } + set { _additionalContactInfo = value; } + } + + /// Gets or sets the BusinessEntityId field. + public virtual System.Int32 BusinessEntityId + { + get { return _businessEntityId; } + set { _businessEntityId = value; } + } + + /// Gets or sets the Demographics field. + public virtual System.String Demographics + { + get { return _demographics; } + set { _demographics = value; } + } + + /// Gets or sets the EmailPromotion field. + public virtual System.Int32 EmailPromotion + { + get { return _emailPromotion; } + set { _emailPromotion = value; } + } + + /// Gets or sets the FirstName field. + public virtual System.String FirstName + { + get { return _firstName; } + set { _firstName = value; } + } + + /// Gets or sets the LastName field. + public virtual System.String LastName + { + get { return _lastName; } + set { _lastName = value; } + } + + /// Gets or sets the MiddleName field. + public virtual System.String MiddleName + { + get { return _middleName; } + set { _middleName = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the NameStyle field. + public virtual System.Boolean NameStyle + { + get { return _nameStyle; } + set { _nameStyle = value; } + } + + /// Gets or sets the PersonType field. + public virtual System.String PersonType + { + get { return _personType; } + set { _personType = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the Suffix field. + public virtual System.String Suffix + { + get { return _suffix; } + set { _suffix = value; } + } + + /// Gets or sets the Title field. + public virtual System.String Title + { + get { return _title; } + set { _title = value; } + } + + /// Represents the navigator which is mapped onto the association 'Person.BusinessEntity - BusinessEntity.Person (1:1)' + public virtual BusinessEntity BusinessEntity + { + get { return _businessEntity; } + set { _businessEntity = value; } + } + + /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.Person - Person.BusinessEntityContacts (m:1)' + public virtual ISet BusinessEntityContacts + { + get { return _businessEntityContacts; } + set { _businessEntityContacts = value; } + } + + /// Represents the navigator which is mapped onto the association 'ContactCreditCard.Person - Person.ContactCreditCards (m:1)' + public virtual ISet ContactCreditCards + { + get { return _contactCreditCards; } + set { _contactCreditCards = value; } + } + + /// Represents the navigator which is mapped onto the association 'Customer.Person - Person.Customers (m:1)' + public virtual ISet Customers + { + get { return _customers; } + set { _customers = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmailAddress.Person - Person.EmailAddresses (m:1)' + public virtual ISet EmailAddresses + { + get { return _emailAddresses; } + set { _emailAddresses = value; } + } + + /// Represents the navigator which is mapped onto the association 'Employee.Person - Person.Employee (1:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + /// Represents the navigator which is mapped onto the association 'Password.Person - Person.Password (1:1)' + public virtual Password Password + { + get { return _password; } + set { _password = value; } + } + + /// Represents the navigator which is mapped onto the association 'PersonPhone.Person - Person.PersonPhones (m:1)' + public virtual ISet PersonPhones + { + get { return _personPhones; } + set { _personPhones = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/PersonPhone.cs b/src/RawBencher/Model/EntityClasses/PersonPhone.cs new file mode 100644 index 00000000000..a4d457e28ab --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/PersonPhone.cs @@ -0,0 +1,77 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'PersonPhone' + public partial class PersonPhone + { + #region Class Member Declarations + private Person _person; + private PhoneNumberType _phoneNumberType; + private System.DateTime _modifiedDate; + private System.String _phoneNumber; + #endregion + + /// Initializes a new instance of the class. + public PersonPhone() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the PhoneNumber field. + public virtual System.String PhoneNumber + { + get { return _phoneNumber; } + set { _phoneNumber = value; } + } + + /// Represents the navigator which is mapped onto the association 'PersonPhone.Person - Person.PersonPhones (m:1)' + public virtual Person Person + { + get { return _person; } + set { _person = value; } + } + + /// Represents the navigator which is mapped onto the association 'PersonPhone.PhoneNumberType - PhoneNumberType.PersonPhones (m:1)' + public virtual PhoneNumberType PhoneNumberType + { + get { return _phoneNumberType; } + set { _phoneNumberType = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/PhoneNumberType.cs b/src/RawBencher/Model/EntityClasses/PhoneNumberType.cs new file mode 100644 index 00000000000..2c3af01bf57 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/PhoneNumberType.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'PhoneNumberType' + public partial class PhoneNumberType + { + #region Class Member Declarations + private ISet _personPhones; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Int32 _phoneNumberTypeId; + #endregion + + /// Initializes a new instance of the class. + public PhoneNumberType() : base() + { + _personPhones = new HashSet(); + _phoneNumberTypeId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.PhoneNumberTypeId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + PhoneNumberType toCompareWith = obj as PhoneNumberType; + return toCompareWith == null ? false : ((this.PhoneNumberTypeId == toCompareWith.PhoneNumberTypeId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the PhoneNumberTypeId field. + public virtual System.Int32 PhoneNumberTypeId + { + get { return _phoneNumberTypeId; } + } + + /// Represents the navigator which is mapped onto the association 'PersonPhone.PhoneNumberType - PhoneNumberType.PersonPhones (m:1)' + public virtual ISet PersonPhones + { + get { return _personPhones; } + set { _personPhones = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Product.cs b/src/RawBencher/Model/EntityClasses/Product.cs new file mode 100644 index 00000000000..a30d0d29f7f --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Product.cs @@ -0,0 +1,377 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Product' + public partial class Product + { + #region Class Member Declarations + private ISet _billOfMaterials; + private ISet _billOfMaterials1; + private ISet _productCostHistories; + private ISet _productDocuments; + private ISet _productInventories; + private ISet _productListPriceHistories; + private ProductModel _productModel; + private ISet _productProductPhotos; + private ISet _productReviews; + private ProductSubcategory _productSubcategory; + private ISet _productVendors; + private ISet _purchaseOrderDetails; + private ISet _shoppingCartItems; + private ISet _specialOfferProducts; + private ISet _transactionHistories; + private UnitMeasure _unitMeasure; + private UnitMeasure _unitMeasure1; + private ISet _workOrders; + private System.String _class; + private System.String _color; + private System.Int32 _daysToManufacture; + private Nullable _discontinuedDate; + private System.Boolean _finishedGoodsFlag; + private System.Decimal _listPrice; + private System.Boolean _makeFlag; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Int32 _productId; + private System.String _productLine; + private System.String _productNumber; + private System.Int16 _reorderPoint; + private System.Guid _rowguid; + private System.Int16 _safetyStockLevel; + private Nullable _sellEndDate; + private System.DateTime _sellStartDate; + private System.String _size; + private System.Decimal _standardCost; + private System.String _style; + private Nullable _weight; + #endregion + + /// Initializes a new instance of the class. + public Product() : base() + { + _billOfMaterials = new HashSet(); + _billOfMaterials1 = new HashSet(); + _productCostHistories = new HashSet(); + _productDocuments = new HashSet(); + _productInventories = new HashSet(); + _productListPriceHistories = new HashSet(); + _productProductPhotos = new HashSet(); + _productReviews = new HashSet(); + _productVendors = new HashSet(); + _purchaseOrderDetails = new HashSet(); + _shoppingCartItems = new HashSet(); + _specialOfferProducts = new HashSet(); + _transactionHistories = new HashSet(); + _workOrders = new HashSet(); + _productId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Product toCompareWith = obj as Product; + return toCompareWith == null ? false : ((this.ProductId == toCompareWith.ProductId)); + } + + + #region Class Property Declarations + /// Gets or sets the Class field. + public virtual System.String Class + { + get { return _class; } + set { _class = value; } + } + + /// Gets or sets the Color field. + public virtual System.String Color + { + get { return _color; } + set { _color = value; } + } + + /// Gets or sets the DaysToManufacture field. + public virtual System.Int32 DaysToManufacture + { + get { return _daysToManufacture; } + set { _daysToManufacture = value; } + } + + /// Gets or sets the DiscontinuedDate field. + public virtual Nullable DiscontinuedDate + { + get { return _discontinuedDate; } + set { _discontinuedDate = value; } + } + + /// Gets or sets the FinishedGoodsFlag field. + public virtual System.Boolean FinishedGoodsFlag + { + get { return _finishedGoodsFlag; } + set { _finishedGoodsFlag = value; } + } + + /// Gets or sets the ListPrice field. + public virtual System.Decimal ListPrice + { + get { return _listPrice; } + set { _listPrice = value; } + } + + /// Gets or sets the MakeFlag field. + public virtual System.Boolean MakeFlag + { + get { return _makeFlag; } + set { _makeFlag = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the ProductId field. + public virtual System.Int32 ProductId + { + get { return _productId; } + } + + /// Gets or sets the ProductLine field. + public virtual System.String ProductLine + { + get { return _productLine; } + set { _productLine = value; } + } + + /// Gets or sets the ProductNumber field. + public virtual System.String ProductNumber + { + get { return _productNumber; } + set { _productNumber = value; } + } + + /// Gets or sets the ReorderPoint field. + public virtual System.Int16 ReorderPoint + { + get { return _reorderPoint; } + set { _reorderPoint = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the SafetyStockLevel field. + public virtual System.Int16 SafetyStockLevel + { + get { return _safetyStockLevel; } + set { _safetyStockLevel = value; } + } + + /// Gets or sets the SellEndDate field. + public virtual Nullable SellEndDate + { + get { return _sellEndDate; } + set { _sellEndDate = value; } + } + + /// Gets or sets the SellStartDate field. + public virtual System.DateTime SellStartDate + { + get { return _sellStartDate; } + set { _sellStartDate = value; } + } + + /// Gets or sets the Size field. + public virtual System.String Size + { + get { return _size; } + set { _size = value; } + } + + /// Gets or sets the StandardCost field. + public virtual System.Decimal StandardCost + { + get { return _standardCost; } + set { _standardCost = value; } + } + + /// Gets or sets the Style field. + public virtual System.String Style + { + get { return _style; } + set { _style = value; } + } + + /// Gets or sets the Weight field. + public virtual Nullable Weight + { + get { return _weight; } + set { _weight = value; } + } + + /// Represents the navigator which is mapped onto the association 'BillOfMaterial.Product - Product.BillOfMaterials (m:1)' + public virtual ISet BillOfMaterials + { + get { return _billOfMaterials; } + set { _billOfMaterials = value; } + } + + /// Represents the navigator which is mapped onto the association 'BillOfMaterial.Product1 - Product.BillOfMaterials1 (m:1)' + public virtual ISet BillOfMaterials1 + { + get { return _billOfMaterials1; } + set { _billOfMaterials1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductCostHistory.Product - Product.ProductCostHistories (m:1)' + public virtual ISet ProductCostHistories + { + get { return _productCostHistories; } + set { _productCostHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductDocument.Product - Product.ProductDocuments (m:1)' + public virtual ISet ProductDocuments + { + get { return _productDocuments; } + set { _productDocuments = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductInventory.Product - Product.ProductInventories (m:1)' + public virtual ISet ProductInventories + { + get { return _productInventories; } + set { _productInventories = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductListPriceHistory.Product - Product.ProductListPriceHistories (m:1)' + public virtual ISet ProductListPriceHistories + { + get { return _productListPriceHistories; } + set { _productListPriceHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.ProductModel - ProductModel.Products (m:1)' + public virtual ProductModel ProductModel + { + get { return _productModel; } + set { _productModel = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductProductPhoto.Product - Product.ProductProductPhotos (m:1)' + public virtual ISet ProductProductPhotos + { + get { return _productProductPhotos; } + set { _productProductPhotos = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductReview.Product - Product.ProductReviews (m:1)' + public virtual ISet ProductReviews + { + get { return _productReviews; } + set { _productReviews = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.ProductSubcategory - ProductSubcategory.Products (m:1)' + public virtual ProductSubcategory ProductSubcategory + { + get { return _productSubcategory; } + set { _productSubcategory = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductVendor.Product - Product.ProductVendors (m:1)' + public virtual ISet ProductVendors + { + get { return _productVendors; } + set { _productVendors = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderDetail.Product - Product.PurchaseOrderDetails (m:1)' + public virtual ISet PurchaseOrderDetails + { + get { return _purchaseOrderDetails; } + set { _purchaseOrderDetails = value; } + } + + /// Represents the navigator which is mapped onto the association 'ShoppingCartItem.Product - Product.ShoppingCartItems (m:1)' + public virtual ISet ShoppingCartItems + { + get { return _shoppingCartItems; } + set { _shoppingCartItems = value; } + } + + /// Represents the navigator which is mapped onto the association 'SpecialOfferProduct.Product - Product.SpecialOfferProducts (m:1)' + public virtual ISet SpecialOfferProducts + { + get { return _specialOfferProducts; } + set { _specialOfferProducts = value; } + } + + /// Represents the navigator which is mapped onto the association 'TransactionHistory.Product - Product.TransactionHistories (m:1)' + public virtual ISet TransactionHistories + { + get { return _transactionHistories; } + set { _transactionHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.UnitMeasure - UnitMeasure.Products (m:1)' + public virtual UnitMeasure UnitMeasure + { + get { return _unitMeasure; } + set { _unitMeasure = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.UnitMeasure1 - UnitMeasure.Products1 (m:1)' + public virtual UnitMeasure UnitMeasure1 + { + get { return _unitMeasure1; } + set { _unitMeasure1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrder.Product - Product.WorkOrders (m:1)' + public virtual ISet WorkOrders + { + get { return _workOrders; } + set { _workOrders = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductCategory.cs b/src/RawBencher/Model/EntityClasses/ProductCategory.cs new file mode 100644 index 00000000000..ca4ccee4117 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductCategory.cs @@ -0,0 +1,92 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductCategory' + public partial class ProductCategory + { + #region Class Member Declarations + private ISet _productSubcategories; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Int32 _productCategoryId; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public ProductCategory() : base() + { + _productSubcategories = new HashSet(); + _productCategoryId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductCategoryId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ProductCategory toCompareWith = obj as ProductCategory; + return toCompareWith == null ? false : ((this.ProductCategoryId == toCompareWith.ProductCategoryId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the ProductCategoryId field. + public virtual System.Int32 ProductCategoryId + { + get { return _productCategoryId; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductSubcategory.ProductCategory - ProductCategory.ProductSubcategories (m:1)' + public virtual ISet ProductSubcategories + { + get { return _productSubcategories; } + set { _productSubcategories = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductCostHistory.cs b/src/RawBencher/Model/EntityClasses/ProductCostHistory.cs new file mode 100644 index 00000000000..0d1384cd4c6 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductCostHistory.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductCostHistory' + public partial class ProductCostHistory + { + #region Class Member Declarations + private Product _product; + private Nullable _endDate; + private System.DateTime _modifiedDate; + private System.Decimal _standardCost; + private System.DateTime _startDate; + #endregion + + /// Initializes a new instance of the class. + public ProductCostHistory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the EndDate field. + public virtual Nullable EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the StandardCost field. + public virtual System.Decimal StandardCost + { + get { return _standardCost; } + set { _standardCost = value; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductCostHistory.Product - Product.ProductCostHistories (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductDescription.cs b/src/RawBencher/Model/EntityClasses/ProductDescription.cs new file mode 100644 index 00000000000..fa58b85d1e0 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductDescription.cs @@ -0,0 +1,92 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductDescription' + public partial class ProductDescription + { + #region Class Member Declarations + private ISet _productModelProductDescriptionCultures; + private System.String _description; + private System.DateTime _modifiedDate; + private System.Int32 _productDescriptionId; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public ProductDescription() : base() + { + _productModelProductDescriptionCultures = new HashSet(); + _productDescriptionId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductDescriptionId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ProductDescription toCompareWith = obj as ProductDescription; + return toCompareWith == null ? false : ((this.ProductDescriptionId == toCompareWith.ProductDescriptionId)); + } + + + #region Class Property Declarations + /// Gets or sets the Description field. + public virtual System.String Description + { + get { return _description; } + set { _description = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets the ProductDescriptionId field. + public virtual System.Int32 ProductDescriptionId + { + get { return _productDescriptionId; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.ProductDescription - ProductDescription.ProductModelProductDescriptionCultures (m:1)' + public virtual ISet ProductModelProductDescriptionCultures + { + get { return _productModelProductDescriptionCultures; } + set { _productModelProductDescriptionCultures = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductDocument.cs b/src/RawBencher/Model/EntityClasses/ProductDocument.cs new file mode 100644 index 00000000000..3dd9fd8832f --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductDocument.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductDocument' + public partial class ProductDocument + { + #region Class Member Declarations + private Document _document; + private Product _product; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public ProductDocument() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductDocument.Document - Document.ProductDocuments (m:1)' + public virtual Document Document + { + get { return _document; } + set { _document = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductDocument.Product - Product.ProductDocuments (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductInventory.cs b/src/RawBencher/Model/EntityClasses/ProductInventory.cs new file mode 100644 index 00000000000..85ae844887b --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductInventory.cs @@ -0,0 +1,101 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductInventory' + public partial class ProductInventory + { + #region Class Member Declarations + private Location _location; + private Product _product; + private System.Byte _bin; + private System.DateTime _modifiedDate; + private System.Int16 _quantity; + private System.Guid _rowguid; + private System.String _shelf; + #endregion + + /// Initializes a new instance of the class. + public ProductInventory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the Bin field. + public virtual System.Byte Bin + { + get { return _bin; } + set { _bin = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Quantity field. + public virtual System.Int16 Quantity + { + get { return _quantity; } + set { _quantity = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the Shelf field. + public virtual System.String Shelf + { + get { return _shelf; } + set { _shelf = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductInventory.Location - Location.ProductInventories (m:1)' + public virtual Location Location + { + get { return _location; } + set { _location = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductInventory.Product - Product.ProductInventories (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductListPriceHistory.cs b/src/RawBencher/Model/EntityClasses/ProductListPriceHistory.cs new file mode 100644 index 00000000000..25b7299e75c --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductListPriceHistory.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductListPriceHistory' + public partial class ProductListPriceHistory + { + #region Class Member Declarations + private Product _product; + private Nullable _endDate; + private System.Decimal _listPrice; + private System.DateTime _modifiedDate; + private System.DateTime _startDate; + #endregion + + /// Initializes a new instance of the class. + public ProductListPriceHistory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the EndDate field. + public virtual Nullable EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the ListPrice field. + public virtual System.Decimal ListPrice + { + get { return _listPrice; } + set { _listPrice = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductListPriceHistory.Product - Product.ProductListPriceHistories (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductModel.cs b/src/RawBencher/Model/EntityClasses/ProductModel.cs new file mode 100644 index 00000000000..9c28fe55815 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductModel.cs @@ -0,0 +1,126 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductModel' + public partial class ProductModel + { + #region Class Member Declarations + private ISet _products; + private ISet _productModelIllustrations; + private ISet _productModelProductDescriptionCultures; + private System.String _catalogDescription; + private System.String _instructions; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Int32 _productModelId; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public ProductModel() : base() + { + _products = new HashSet(); + _productModelIllustrations = new HashSet(); + _productModelProductDescriptionCultures = new HashSet(); + _productModelId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductModelId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ProductModel toCompareWith = obj as ProductModel; + return toCompareWith == null ? false : ((this.ProductModelId == toCompareWith.ProductModelId)); + } + + + #region Class Property Declarations + /// Gets or sets the CatalogDescription field. + public virtual System.String CatalogDescription + { + get { return _catalogDescription; } + set { _catalogDescription = value; } + } + + /// Gets or sets the Instructions field. + public virtual System.String Instructions + { + get { return _instructions; } + set { _instructions = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the ProductModelId field. + public virtual System.Int32 ProductModelId + { + get { return _productModelId; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.ProductModel - ProductModel.Products (m:1)' + public virtual ISet Products + { + get { return _products; } + set { _products = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelIllustration.ProductModel - ProductModel.ProductModelIllustrations (m:1)' + public virtual ISet ProductModelIllustrations + { + get { return _productModelIllustrations; } + set { _productModelIllustrations = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.ProductModel - ProductModel.ProductModelProductDescriptionCultures (m:1)' + public virtual ISet ProductModelProductDescriptionCultures + { + get { return _productModelProductDescriptionCultures; } + set { _productModelProductDescriptionCultures = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductModelIllustration.cs b/src/RawBencher/Model/EntityClasses/ProductModelIllustration.cs new file mode 100644 index 00000000000..324b3820dd2 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductModelIllustration.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductModelIllustration' + public partial class ProductModelIllustration + { + #region Class Member Declarations + private Illustration _illustration; + private ProductModel _productModel; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public ProductModelIllustration() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelIllustration.Illustration - Illustration.ProductModelIllustrations (m:1)' + public virtual Illustration Illustration + { + get { return _illustration; } + set { _illustration = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelIllustration.ProductModel - ProductModel.ProductModelIllustrations (m:1)' + public virtual ProductModel ProductModel + { + get { return _productModel; } + set { _productModel = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductModelProductDescriptionCulture.cs b/src/RawBencher/Model/EntityClasses/ProductModelProductDescriptionCulture.cs new file mode 100644 index 00000000000..1c98cc24358 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductModelProductDescriptionCulture.cs @@ -0,0 +1,77 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductModelProductDescriptionCulture' + public partial class ProductModelProductDescriptionCulture + { + #region Class Member Declarations + private Culture _culture; + private ProductDescription _productDescription; + private ProductModel _productModel; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public ProductModelProductDescriptionCulture() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.Culture - Culture.ProductModelProductDescriptionCultures (m:1)' + public virtual Culture Culture + { + get { return _culture; } + set { _culture = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.ProductDescription - ProductDescription.ProductModelProductDescriptionCultures (m:1)' + public virtual ProductDescription ProductDescription + { + get { return _productDescription; } + set { _productDescription = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.ProductModel - ProductModel.ProductModelProductDescriptionCultures (m:1)' + public virtual ProductModel ProductModel + { + get { return _productModel; } + set { _productModel = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductPhoto.cs b/src/RawBencher/Model/EntityClasses/ProductPhoto.cs new file mode 100644 index 00000000000..aeba6b7059b --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductPhoto.cs @@ -0,0 +1,108 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductPhoto' + public partial class ProductPhoto + { + #region Class Member Declarations + private ISet _productProductPhotos; + private System.Byte[] _largePhoto; + private System.String _largePhotoFileName; + private System.DateTime _modifiedDate; + private System.Int32 _productPhotoId; + private System.Byte[] _thumbNailPhoto; + private System.String _thumbnailPhotoFileName; + #endregion + + /// Initializes a new instance of the class. + public ProductPhoto() : base() + { + _productProductPhotos = new HashSet(); + _productPhotoId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductPhotoId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ProductPhoto toCompareWith = obj as ProductPhoto; + return toCompareWith == null ? false : ((this.ProductPhotoId == toCompareWith.ProductPhotoId)); + } + + + #region Class Property Declarations + /// Gets or sets the LargePhoto field. + public virtual System.Byte[] LargePhoto + { + get { return _largePhoto; } + set { _largePhoto = value; } + } + + /// Gets or sets the LargePhotoFileName field. + public virtual System.String LargePhotoFileName + { + get { return _largePhotoFileName; } + set { _largePhotoFileName = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets the ProductPhotoId field. + public virtual System.Int32 ProductPhotoId + { + get { return _productPhotoId; } + } + + /// Gets or sets the ThumbNailPhoto field. + public virtual System.Byte[] ThumbNailPhoto + { + get { return _thumbNailPhoto; } + set { _thumbNailPhoto = value; } + } + + /// Gets or sets the ThumbnailPhotoFileName field. + public virtual System.String ThumbnailPhotoFileName + { + get { return _thumbnailPhotoFileName; } + set { _thumbnailPhotoFileName = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductProductPhoto.ProductPhoto - ProductPhoto.ProductProductPhotos (m:1)' + public virtual ISet ProductProductPhotos + { + get { return _productProductPhotos; } + set { _productProductPhotos = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductProductPhoto.cs b/src/RawBencher/Model/EntityClasses/ProductProductPhoto.cs new file mode 100644 index 00000000000..f594d6a5f70 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductProductPhoto.cs @@ -0,0 +1,77 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductProductPhoto' + public partial class ProductProductPhoto + { + #region Class Member Declarations + private Product _product; + private ProductPhoto _productPhoto; + private System.DateTime _modifiedDate; + private System.Boolean _primary; + #endregion + + /// Initializes a new instance of the class. + public ProductProductPhoto() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Primary field. + public virtual System.Boolean Primary + { + get { return _primary; } + set { _primary = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductProductPhoto.Product - Product.ProductProductPhotos (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductProductPhoto.ProductPhoto - ProductPhoto.ProductProductPhotos (m:1)' + public virtual ProductPhoto ProductPhoto + { + get { return _productPhoto; } + set { _productPhoto = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductReview.cs b/src/RawBencher/Model/EntityClasses/ProductReview.cs new file mode 100644 index 00000000000..b2bdfb95652 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductReview.cs @@ -0,0 +1,115 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductReview' + public partial class ProductReview + { + #region Class Member Declarations + private Product _product; + private System.String _comments; + private System.String _emailAddress; + private System.DateTime _modifiedDate; + private System.Int32 _productReviewId; + private System.Int32 _rating; + private System.DateTime _reviewDate; + private System.String _reviewerName; + #endregion + + /// Initializes a new instance of the class. + public ProductReview() : base() + { + _productReviewId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductReviewId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ProductReview toCompareWith = obj as ProductReview; + return toCompareWith == null ? false : ((this.ProductReviewId == toCompareWith.ProductReviewId)); + } + + + #region Class Property Declarations + /// Gets or sets the Comments field. + public virtual System.String Comments + { + get { return _comments; } + set { _comments = value; } + } + + /// Gets or sets the EmailAddress field. + public virtual System.String EmailAddress + { + get { return _emailAddress; } + set { _emailAddress = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets the ProductReviewId field. + public virtual System.Int32 ProductReviewId + { + get { return _productReviewId; } + } + + /// Gets or sets the Rating field. + public virtual System.Int32 Rating + { + get { return _rating; } + set { _rating = value; } + } + + /// Gets or sets the ReviewDate field. + public virtual System.DateTime ReviewDate + { + get { return _reviewDate; } + set { _reviewDate = value; } + } + + /// Gets or sets the ReviewerName field. + public virtual System.String ReviewerName + { + get { return _reviewerName; } + set { _reviewerName = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductReview.Product - Product.ProductReviews (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductSubcategory.cs b/src/RawBencher/Model/EntityClasses/ProductSubcategory.cs new file mode 100644 index 00000000000..2b1187f8f60 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductSubcategory.cs @@ -0,0 +1,100 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductSubcategory' + public partial class ProductSubcategory + { + #region Class Member Declarations + private ISet _products; + private ProductCategory _productCategory; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Int32 _productSubcategoryId; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public ProductSubcategory() : base() + { + _products = new HashSet(); + _productSubcategoryId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ProductSubcategoryId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ProductSubcategory toCompareWith = obj as ProductSubcategory; + return toCompareWith == null ? false : ((this.ProductSubcategoryId == toCompareWith.ProductSubcategoryId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the ProductSubcategoryId field. + public virtual System.Int32 ProductSubcategoryId + { + get { return _productSubcategoryId; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.ProductSubcategory - ProductSubcategory.Products (m:1)' + public virtual ISet Products + { + get { return _products; } + set { _products = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductSubcategory.ProductCategory - ProductCategory.ProductSubcategories (m:1)' + public virtual ProductCategory ProductCategory + { + get { return _productCategory; } + set { _productCategory = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ProductVendor.cs b/src/RawBencher/Model/EntityClasses/ProductVendor.cs new file mode 100644 index 00000000000..9d97d12f969 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ProductVendor.cs @@ -0,0 +1,133 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ProductVendor' + public partial class ProductVendor + { + #region Class Member Declarations + private Product _product; + private UnitMeasure _unitMeasure; + private Vendor _vendor; + private System.Int32 _averageLeadTime; + private Nullable _lastReceiptCost; + private Nullable _lastReceiptDate; + private System.Int32 _maxOrderQty; + private System.Int32 _minOrderQty; + private System.DateTime _modifiedDate; + private Nullable _onOrderQty; + private System.Decimal _standardPrice; + #endregion + + /// Initializes a new instance of the class. + public ProductVendor() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the AverageLeadTime field. + public virtual System.Int32 AverageLeadTime + { + get { return _averageLeadTime; } + set { _averageLeadTime = value; } + } + + /// Gets or sets the LastReceiptCost field. + public virtual Nullable LastReceiptCost + { + get { return _lastReceiptCost; } + set { _lastReceiptCost = value; } + } + + /// Gets or sets the LastReceiptDate field. + public virtual Nullable LastReceiptDate + { + get { return _lastReceiptDate; } + set { _lastReceiptDate = value; } + } + + /// Gets or sets the MaxOrderQty field. + public virtual System.Int32 MaxOrderQty + { + get { return _maxOrderQty; } + set { _maxOrderQty = value; } + } + + /// Gets or sets the MinOrderQty field. + public virtual System.Int32 MinOrderQty + { + get { return _minOrderQty; } + set { _minOrderQty = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OnOrderQty field. + public virtual Nullable OnOrderQty + { + get { return _onOrderQty; } + set { _onOrderQty = value; } + } + + /// Gets or sets the StandardPrice field. + public virtual System.Decimal StandardPrice + { + get { return _standardPrice; } + set { _standardPrice = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductVendor.Product - Product.ProductVendors (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductVendor.UnitMeasure - UnitMeasure.ProductVendors (m:1)' + public virtual UnitMeasure UnitMeasure + { + get { return _unitMeasure; } + set { _unitMeasure = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductVendor.Vendor - Vendor.ProductVendors (m:1)' + public virtual Vendor Vendor + { + get { return _vendor; } + set { _vendor = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/PurchaseOrderDetail.cs b/src/RawBencher/Model/EntityClasses/PurchaseOrderDetail.cs new file mode 100644 index 00000000000..2a78757db2e --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/PurchaseOrderDetail.cs @@ -0,0 +1,133 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'PurchaseOrderDetail' + public partial class PurchaseOrderDetail + { + #region Class Member Declarations + private Product _product; + private PurchaseOrderHeader _purchaseOrderHeader; + private System.DateTime _dueDate; + private System.Decimal _lineTotal; + private System.DateTime _modifiedDate; + private System.Int16 _orderQty; + private System.Int32 _purchaseOrderDetailId; + private System.Decimal _receivedQty; + private System.Decimal _rejectedQty; + private System.Decimal _stockedQty; + private System.Decimal _unitPrice; + #endregion + + /// Initializes a new instance of the class. + public PurchaseOrderDetail() : base() + { + _lineTotal = default(System.Decimal); + _purchaseOrderDetailId = default(System.Int32); + _stockedQty = default(System.Decimal); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the DueDate field. + public virtual System.DateTime DueDate + { + get { return _dueDate; } + set { _dueDate = value; } + } + + /// Gets the LineTotal field. + public virtual System.Decimal LineTotal + { + get { return _lineTotal; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OrderQty field. + public virtual System.Int16 OrderQty + { + get { return _orderQty; } + set { _orderQty = value; } + } + + /// Gets the PurchaseOrderDetailId field. + public virtual System.Int32 PurchaseOrderDetailId + { + get { return _purchaseOrderDetailId; } + } + + /// Gets or sets the ReceivedQty field. + public virtual System.Decimal ReceivedQty + { + get { return _receivedQty; } + set { _receivedQty = value; } + } + + /// Gets or sets the RejectedQty field. + public virtual System.Decimal RejectedQty + { + get { return _rejectedQty; } + set { _rejectedQty = value; } + } + + /// Gets the StockedQty field. + public virtual System.Decimal StockedQty + { + get { return _stockedQty; } + } + + /// Gets or sets the UnitPrice field. + public virtual System.Decimal UnitPrice + { + get { return _unitPrice; } + set { _unitPrice = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderDetail.Product - Product.PurchaseOrderDetails (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderDetail.PurchaseOrderHeader - PurchaseOrderHeader.PurchaseOrderDetails (m:1)' + public virtual PurchaseOrderHeader PurchaseOrderHeader + { + get { return _purchaseOrderHeader; } + set { _purchaseOrderHeader = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/PurchaseOrderHeader.cs b/src/RawBencher/Model/EntityClasses/PurchaseOrderHeader.cs new file mode 100644 index 00000000000..97d4da27890 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/PurchaseOrderHeader.cs @@ -0,0 +1,164 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'PurchaseOrderHeader' + public partial class PurchaseOrderHeader + { + #region Class Member Declarations + private Employee _employee; + private ISet _purchaseOrderDetails; + private ShipMethod _shipMethod; + private Vendor _vendor; + private System.Decimal _freight; + private System.DateTime _modifiedDate; + private System.DateTime _orderDate; + private System.Int32 _purchaseOrderId; + private System.Byte _revisionNumber; + private Nullable _shipDate; + private System.Byte _status; + private System.Decimal _subTotal; + private System.Decimal _taxAmt; + private System.Decimal _totalDue; + #endregion + + /// Initializes a new instance of the class. + public PurchaseOrderHeader() : base() + { + _purchaseOrderDetails = new HashSet(); + _purchaseOrderId = default(System.Int32); + _totalDue = default(System.Decimal); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.PurchaseOrderId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + PurchaseOrderHeader toCompareWith = obj as PurchaseOrderHeader; + return toCompareWith == null ? false : ((this.PurchaseOrderId == toCompareWith.PurchaseOrderId)); + } + + + #region Class Property Declarations + /// Gets or sets the Freight field. + public virtual System.Decimal Freight + { + get { return _freight; } + set { _freight = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OrderDate field. + public virtual System.DateTime OrderDate + { + get { return _orderDate; } + set { _orderDate = value; } + } + + /// Gets the PurchaseOrderId field. + public virtual System.Int32 PurchaseOrderId + { + get { return _purchaseOrderId; } + } + + /// Gets or sets the RevisionNumber field. + public virtual System.Byte RevisionNumber + { + get { return _revisionNumber; } + set { _revisionNumber = value; } + } + + /// Gets or sets the ShipDate field. + public virtual Nullable ShipDate + { + get { return _shipDate; } + set { _shipDate = value; } + } + + /// Gets or sets the Status field. + public virtual System.Byte Status + { + get { return _status; } + set { _status = value; } + } + + /// Gets or sets the SubTotal field. + public virtual System.Decimal SubTotal + { + get { return _subTotal; } + set { _subTotal = value; } + } + + /// Gets or sets the TaxAmt field. + public virtual System.Decimal TaxAmt + { + get { return _taxAmt; } + set { _taxAmt = value; } + } + + /// Gets the TotalDue field. + public virtual System.Decimal TotalDue + { + get { return _totalDue; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderHeader.Employee - Employee.PurchaseOrderHeaders (m:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderDetail.PurchaseOrderHeader - PurchaseOrderHeader.PurchaseOrderDetails (m:1)' + public virtual ISet PurchaseOrderDetails + { + get { return _purchaseOrderDetails; } + set { _purchaseOrderDetails = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderHeader.ShipMethod - ShipMethod.PurchaseOrderHeaders (m:1)' + public virtual ShipMethod ShipMethod + { + get { return _shipMethod; } + set { _shipMethod = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderHeader.Vendor - Vendor.PurchaseOrderHeaders (m:1)' + public virtual Vendor Vendor + { + get { return _vendor; } + set { _vendor = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesOrderDetail.cs b/src/RawBencher/Model/EntityClasses/SalesOrderDetail.cs new file mode 100644 index 00000000000..f5d8590d310 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesOrderDetail.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesOrderDetail' + public partial class SalesOrderDetail + { + #region Class Member Declarations + private SalesOrderHeader _salesOrderHeader; + private SpecialOfferProduct _specialOfferProduct; + private System.String _carrierTrackingNumber; + private System.Decimal _lineTotal; + private System.DateTime _modifiedDate; + private System.Int16 _orderQty; + private System.Guid _rowguid; + private System.Int32 _salesOrderDetailId; + private System.Decimal _unitPrice; + private System.Decimal _unitPriceDiscount; + #endregion + + /// Initializes a new instance of the class. + public SalesOrderDetail() : base() + { + _lineTotal = default(System.Decimal); + _salesOrderDetailId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the CarrierTrackingNumber field. + public virtual System.String CarrierTrackingNumber + { + get { return _carrierTrackingNumber; } + set { _carrierTrackingNumber = value; } + } + + /// Gets the LineTotal field. + public virtual System.Decimal LineTotal + { + get { return _lineTotal; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OrderQty field. + public virtual System.Int16 OrderQty + { + get { return _orderQty; } + set { _orderQty = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets the SalesOrderDetailId field. + public virtual System.Int32 SalesOrderDetailId + { + get { return _salesOrderDetailId; } + } + + /// Gets or sets the UnitPrice field. + public virtual System.Decimal UnitPrice + { + get { return _unitPrice; } + set { _unitPrice = value; } + } + + /// Gets or sets the UnitPriceDiscount field. + public virtual System.Decimal UnitPriceDiscount + { + get { return _unitPriceDiscount; } + set { _unitPriceDiscount = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderDetail.SalesOrderHeader - SalesOrderHeader.SalesOrderDetails (m:1)' + public virtual SalesOrderHeader SalesOrderHeader + { + get { return _salesOrderHeader; } + set { _salesOrderHeader = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderDetail.SpecialOfferProduct - SpecialOfferProduct.SalesOrderDetails (m:1)' + public virtual SpecialOfferProduct SpecialOfferProduct + { + get { return _specialOfferProduct; } + set { _specialOfferProduct = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesOrderHeader.cs b/src/RawBencher/Model/EntityClasses/SalesOrderHeader.cs new file mode 100644 index 00000000000..d83797375fa --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesOrderHeader.cs @@ -0,0 +1,277 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesOrderHeader' + public partial class SalesOrderHeader + { + #region Class Member Declarations + private Address _address; + private Address _address1; + private CreditCard _creditCard; + private CurrencyRate _currencyRate; + private Customer _customer; + private ISet _salesOrderDetails; + private ISet _salesOrderHeaderSalesReasons; + private SalesPerson _salesPerson; + private SalesTerritory _salesTerritory; + private ShipMethod _shipMethod; + private System.String _accountNumber; + private System.String _comment; + private System.String _creditCardApprovalCode; + private System.DateTime _dueDate; + private System.Decimal _freight; + private System.DateTime _modifiedDate; + private System.Boolean _onlineOrderFlag; + private System.DateTime _orderDate; + private System.String _purchaseOrderNumber; + private System.Byte _revisionNumber; + private System.Guid _rowguid; + private System.Int32 _salesOrderId; + private System.String _salesOrderNumber; + private Nullable _shipDate; + private System.Byte _status; + private System.Decimal _subTotal; + private System.Decimal _taxAmt; + private System.Decimal _totalDue; + #endregion + + /// Initializes a new instance of the class. + public SalesOrderHeader() : base() + { + _salesOrderDetails = new HashSet(); + _salesOrderHeaderSalesReasons = new HashSet(); + _salesOrderId = default(System.Int32); + _salesOrderNumber = default(System.String); + _totalDue = default(System.Decimal); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.SalesOrderId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + SalesOrderHeader toCompareWith = obj as SalesOrderHeader; + return toCompareWith == null ? false : ((this.SalesOrderId == toCompareWith.SalesOrderId)); + } + + + #region Class Property Declarations + /// Gets or sets the AccountNumber field. + public virtual System.String AccountNumber + { + get { return _accountNumber; } + set { _accountNumber = value; } + } + + /// Gets or sets the Comment field. + public virtual System.String Comment + { + get { return _comment; } + set { _comment = value; } + } + + /// Gets or sets the CreditCardApprovalCode field. + public virtual System.String CreditCardApprovalCode + { + get { return _creditCardApprovalCode; } + set { _creditCardApprovalCode = value; } + } + + /// Gets or sets the DueDate field. + public virtual System.DateTime DueDate + { + get { return _dueDate; } + set { _dueDate = value; } + } + + /// Gets or sets the Freight field. + public virtual System.Decimal Freight + { + get { return _freight; } + set { _freight = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OnlineOrderFlag field. + public virtual System.Boolean OnlineOrderFlag + { + get { return _onlineOrderFlag; } + set { _onlineOrderFlag = value; } + } + + /// Gets or sets the OrderDate field. + public virtual System.DateTime OrderDate + { + get { return _orderDate; } + set { _orderDate = value; } + } + + /// Gets or sets the PurchaseOrderNumber field. + public virtual System.String PurchaseOrderNumber + { + get { return _purchaseOrderNumber; } + set { _purchaseOrderNumber = value; } + } + + /// Gets or sets the RevisionNumber field. + public virtual System.Byte RevisionNumber + { + get { return _revisionNumber; } + set { _revisionNumber = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets the SalesOrderId field. + public virtual System.Int32 SalesOrderId + { + get { return _salesOrderId; } + } + + /// Gets the SalesOrderNumber field. + public virtual System.String SalesOrderNumber + { + get { return _salesOrderNumber; } + } + + /// Gets or sets the ShipDate field. + public virtual Nullable ShipDate + { + get { return _shipDate; } + set { _shipDate = value; } + } + + /// Gets or sets the Status field. + public virtual System.Byte Status + { + get { return _status; } + set { _status = value; } + } + + /// Gets or sets the SubTotal field. + public virtual System.Decimal SubTotal + { + get { return _subTotal; } + set { _subTotal = value; } + } + + /// Gets or sets the TaxAmt field. + public virtual System.Decimal TaxAmt + { + get { return _taxAmt; } + set { _taxAmt = value; } + } + + /// Gets the TotalDue field. + public virtual System.Decimal TotalDue + { + get { return _totalDue; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Address - Address.SalesOrderHeaders (m:1)' + public virtual Address Address + { + get { return _address; } + set { _address = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Address1 - Address.SalesOrderHeaders1 (m:1)' + public virtual Address Address1 + { + get { return _address1; } + set { _address1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.CreditCard - CreditCard.SalesOrderHeaders (m:1)' + public virtual CreditCard CreditCard + { + get { return _creditCard; } + set { _creditCard = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.CurrencyRate - CurrencyRate.SalesOrderHeaders (m:1)' + public virtual CurrencyRate CurrencyRate + { + get { return _currencyRate; } + set { _currencyRate = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Customer - Customer.SalesOrderHeaders (m:1)' + public virtual Customer Customer + { + get { return _customer; } + set { _customer = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderDetail.SalesOrderHeader - SalesOrderHeader.SalesOrderDetails (m:1)' + public virtual ISet SalesOrderDetails + { + get { return _salesOrderDetails; } + set { _salesOrderDetails = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeaderSalesReason.SalesOrderHeader - SalesOrderHeader.SalesOrderHeaderSalesReasons (m:1)' + public virtual ISet SalesOrderHeaderSalesReasons + { + get { return _salesOrderHeaderSalesReasons; } + set { _salesOrderHeaderSalesReasons = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.SalesPerson - SalesPerson.SalesOrderHeaders (m:1)' + public virtual SalesPerson SalesPerson + { + get { return _salesPerson; } + set { _salesPerson = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.SalesTerritory - SalesTerritory.SalesOrderHeaders (m:1)' + public virtual SalesTerritory SalesTerritory + { + get { return _salesTerritory; } + set { _salesTerritory = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.ShipMethod - ShipMethod.SalesOrderHeaders (m:1)' + public virtual ShipMethod ShipMethod + { + get { return _shipMethod; } + set { _shipMethod = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesOrderHeaderSalesReason.cs b/src/RawBencher/Model/EntityClasses/SalesOrderHeaderSalesReason.cs new file mode 100644 index 00000000000..851bfb1ee95 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesOrderHeaderSalesReason.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesOrderHeaderSalesReason' + public partial class SalesOrderHeaderSalesReason + { + #region Class Member Declarations + private SalesOrderHeader _salesOrderHeader; + private SalesReason _salesReason; + private System.DateTime _modifiedDate; + #endregion + + /// Initializes a new instance of the class. + public SalesOrderHeaderSalesReason() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeaderSalesReason.SalesOrderHeader - SalesOrderHeader.SalesOrderHeaderSalesReasons (m:1)' + public virtual SalesOrderHeader SalesOrderHeader + { + get { return _salesOrderHeader; } + set { _salesOrderHeader = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeaderSalesReason.SalesReason - SalesReason.SalesOrderHeaderSalesReasons (m:1)' + public virtual SalesReason SalesReason + { + get { return _salesReason; } + set { _salesReason = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesPerson.cs b/src/RawBencher/Model/EntityClasses/SalesPerson.cs new file mode 100644 index 00000000000..00ca8d1532f --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesPerson.cs @@ -0,0 +1,162 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesPerson' + public partial class SalesPerson + { + #region Class Member Declarations + private Employee _employee; + private ISet _salesOrderHeaders; + private ISet _salesPersonQuotaHistories; + private SalesTerritory _salesTerritory; + private ISet _salesTerritoryHistories; + private ISet _stores; + private System.Decimal _bonus; + private System.Decimal _commissionPct; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + private System.Decimal _salesLastYear; + private System.Int32 _salesPersonId; + private Nullable _salesQuota; + private System.Decimal _salesYtd; + #endregion + + /// Initializes a new instance of the class. + public SalesPerson() : base() + { + _salesOrderHeaders = new HashSet(); + _salesPersonQuotaHistories = new HashSet(); + _salesTerritoryHistories = new HashSet(); + _stores = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.SalesPersonId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the Bonus field. + public virtual System.Decimal Bonus + { + get { return _bonus; } + set { _bonus = value; } + } + + /// Gets or sets the CommissionPct field. + public virtual System.Decimal CommissionPct + { + get { return _commissionPct; } + set { _commissionPct = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the SalesLastYear field. + public virtual System.Decimal SalesLastYear + { + get { return _salesLastYear; } + set { _salesLastYear = value; } + } + + /// Gets or sets the SalesPersonId field. + public virtual System.Int32 SalesPersonId + { + get { return _salesPersonId; } + set { _salesPersonId = value; } + } + + /// Gets or sets the SalesQuota field. + public virtual Nullable SalesQuota + { + get { return _salesQuota; } + set { _salesQuota = value; } + } + + /// Gets or sets the SalesYtd field. + public virtual System.Decimal SalesYtd + { + get { return _salesYtd; } + set { _salesYtd = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesPerson.Employee - Employee.SalesPerson (1:1)' + public virtual Employee Employee + { + get { return _employee; } + set { _employee = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.SalesPerson - SalesPerson.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesPersonQuotaHistory.SalesPerson - SalesPerson.SalesPersonQuotaHistories (m:1)' + public virtual ISet SalesPersonQuotaHistories + { + get { return _salesPersonQuotaHistories; } + set { _salesPersonQuotaHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesPerson.SalesTerritory - SalesTerritory.SalesPeople (m:1)' + public virtual SalesTerritory SalesTerritory + { + get { return _salesTerritory; } + set { _salesTerritory = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTerritoryHistory.SalesPerson - SalesPerson.SalesTerritoryHistories (m:1)' + public virtual ISet SalesTerritoryHistories + { + get { return _salesTerritoryHistories; } + set { _salesTerritoryHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'Store.SalesPerson - SalesPerson.Stores (m:1)' + public virtual ISet Stores + { + get { return _stores; } + set { _stores = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesPersonQuotaHistory.cs b/src/RawBencher/Model/EntityClasses/SalesPersonQuotaHistory.cs new file mode 100644 index 00000000000..1985ffb344f --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesPersonQuotaHistory.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesPersonQuotaHistory' + public partial class SalesPersonQuotaHistory + { + #region Class Member Declarations + private SalesPerson _salesPerson; + private System.DateTime _modifiedDate; + private System.DateTime _quotaDate; + private System.Guid _rowguid; + private System.Decimal _salesQuota; + #endregion + + /// Initializes a new instance of the class. + public SalesPersonQuotaHistory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the QuotaDate field. + public virtual System.DateTime QuotaDate + { + get { return _quotaDate; } + set { _quotaDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the SalesQuota field. + public virtual System.Decimal SalesQuota + { + get { return _salesQuota; } + set { _salesQuota = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesPersonQuotaHistory.SalesPerson - SalesPerson.SalesPersonQuotaHistories (m:1)' + public virtual SalesPerson SalesPerson + { + get { return _salesPerson; } + set { _salesPerson = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesReason.cs b/src/RawBencher/Model/EntityClasses/SalesReason.cs new file mode 100644 index 00000000000..0c375bf21a2 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesReason.cs @@ -0,0 +1,92 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesReason' + public partial class SalesReason + { + #region Class Member Declarations + private ISet _salesOrderHeaderSalesReasons; + private System.DateTime _modifiedDate; + private System.String _name; + private System.String _reasonType; + private System.Int32 _salesReasonId; + #endregion + + /// Initializes a new instance of the class. + public SalesReason() : base() + { + _salesOrderHeaderSalesReasons = new HashSet(); + _salesReasonId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.SalesReasonId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + SalesReason toCompareWith = obj as SalesReason; + return toCompareWith == null ? false : ((this.SalesReasonId == toCompareWith.SalesReasonId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the ReasonType field. + public virtual System.String ReasonType + { + get { return _reasonType; } + set { _reasonType = value; } + } + + /// Gets the SalesReasonId field. + public virtual System.Int32 SalesReasonId + { + get { return _salesReasonId; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeaderSalesReason.SalesReason - SalesReason.SalesOrderHeaderSalesReasons (m:1)' + public virtual ISet SalesOrderHeaderSalesReasons + { + get { return _salesOrderHeaderSalesReasons; } + set { _salesOrderHeaderSalesReasons = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesTaxRate.cs b/src/RawBencher/Model/EntityClasses/SalesTaxRate.cs new file mode 100644 index 00000000000..ed738076c1a --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesTaxRate.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesTaxRate' + public partial class SalesTaxRate + { + #region Class Member Declarations + private StateProvince _stateProvince; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Guid _rowguid; + private System.Int32 _salesTaxRateId; + private System.Decimal _taxRate; + private System.Byte _taxType; + #endregion + + /// Initializes a new instance of the class. + public SalesTaxRate() : base() + { + _salesTaxRateId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.SalesTaxRateId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + SalesTaxRate toCompareWith = obj as SalesTaxRate; + return toCompareWith == null ? false : ((this.SalesTaxRateId == toCompareWith.SalesTaxRateId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets the SalesTaxRateId field. + public virtual System.Int32 SalesTaxRateId + { + get { return _salesTaxRateId; } + } + + /// Gets or sets the TaxRate field. + public virtual System.Decimal TaxRate + { + get { return _taxRate; } + set { _taxRate = value; } + } + + /// Gets or sets the TaxType field. + public virtual System.Byte TaxType + { + get { return _taxType; } + set { _taxType = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTaxRate.StateProvince - StateProvince.SalesTaxRates (m:1)' + public virtual StateProvince StateProvince + { + get { return _stateProvince; } + set { _stateProvince = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesTerritory.cs b/src/RawBencher/Model/EntityClasses/SalesTerritory.cs new file mode 100644 index 00000000000..bf3e7d1959d --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesTerritory.cs @@ -0,0 +1,176 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesTerritory' + public partial class SalesTerritory + { + #region Class Member Declarations + private CountryRegion _countryRegion; + private ISet _customers; + private ISet _salesOrderHeaders; + private ISet _salesPeople; + private ISet _salesTerritoryHistories; + private ISet _stateProvinces; + private System.Decimal _costLastYear; + private System.Decimal _costYtd; + private System.String _group; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Guid _rowguid; + private System.Decimal _salesLastYear; + private System.Decimal _salesYtd; + private System.Int32 _territoryId; + #endregion + + /// Initializes a new instance of the class. + public SalesTerritory() : base() + { + _customers = new HashSet(); + _salesOrderHeaders = new HashSet(); + _salesPeople = new HashSet(); + _salesTerritoryHistories = new HashSet(); + _stateProvinces = new HashSet(); + _territoryId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.TerritoryId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + SalesTerritory toCompareWith = obj as SalesTerritory; + return toCompareWith == null ? false : ((this.TerritoryId == toCompareWith.TerritoryId)); + } + + + #region Class Property Declarations + /// Gets or sets the CostLastYear field. + public virtual System.Decimal CostLastYear + { + get { return _costLastYear; } + set { _costLastYear = value; } + } + + /// Gets or sets the CostYtd field. + public virtual System.Decimal CostYtd + { + get { return _costYtd; } + set { _costYtd = value; } + } + + /// Gets or sets the Group field. + public virtual System.String Group + { + get { return _group; } + set { _group = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the SalesLastYear field. + public virtual System.Decimal SalesLastYear + { + get { return _salesLastYear; } + set { _salesLastYear = value; } + } + + /// Gets or sets the SalesYtd field. + public virtual System.Decimal SalesYtd + { + get { return _salesYtd; } + set { _salesYtd = value; } + } + + /// Gets the TerritoryId field. + public virtual System.Int32 TerritoryId + { + get { return _territoryId; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTerritory.CountryRegion - CountryRegion.SalesTerritories (m:1)' + public virtual CountryRegion CountryRegion + { + get { return _countryRegion; } + set { _countryRegion = value; } + } + + /// Represents the navigator which is mapped onto the association 'Customer.SalesTerritory - SalesTerritory.Customers (m:1)' + public virtual ISet Customers + { + get { return _customers; } + set { _customers = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.SalesTerritory - SalesTerritory.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesPerson.SalesTerritory - SalesTerritory.SalesPeople (m:1)' + public virtual ISet SalesPeople + { + get { return _salesPeople; } + set { _salesPeople = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTerritoryHistory.SalesTerritory - SalesTerritory.SalesTerritoryHistories (m:1)' + public virtual ISet SalesTerritoryHistories + { + get { return _salesTerritoryHistories; } + set { _salesTerritoryHistories = value; } + } + + /// Represents the navigator which is mapped onto the association 'StateProvince.SalesTerritory - SalesTerritory.StateProvinces (m:1)' + public virtual ISet StateProvinces + { + get { return _stateProvinces; } + set { _stateProvinces = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SalesTerritoryHistory.cs b/src/RawBencher/Model/EntityClasses/SalesTerritoryHistory.cs new file mode 100644 index 00000000000..f428e767377 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SalesTerritoryHistory.cs @@ -0,0 +1,93 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SalesTerritoryHistory' + public partial class SalesTerritoryHistory + { + #region Class Member Declarations + private SalesPerson _salesPerson; + private SalesTerritory _salesTerritory; + private Nullable _endDate; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + private System.DateTime _startDate; + #endregion + + /// Initializes a new instance of the class. + public SalesTerritoryHistory() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the EndDate field. + public virtual Nullable EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTerritoryHistory.SalesPerson - SalesPerson.SalesTerritoryHistories (m:1)' + public virtual SalesPerson SalesPerson + { + get { return _salesPerson; } + set { _salesPerson = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTerritoryHistory.SalesTerritory - SalesTerritory.SalesTerritoryHistories (m:1)' + public virtual SalesTerritory SalesTerritory + { + get { return _salesTerritory; } + set { _salesTerritory = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ScrapReason.cs b/src/RawBencher/Model/EntityClasses/ScrapReason.cs new file mode 100644 index 00000000000..6b13e4e643b --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ScrapReason.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ScrapReason' + public partial class ScrapReason + { + #region Class Member Declarations + private ISet _workOrders; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Int16 _scrapReasonId; + #endregion + + /// Initializes a new instance of the class. + public ScrapReason() : base() + { + _workOrders = new HashSet(); + _scrapReasonId = default(System.Int16); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ScrapReasonId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ScrapReason toCompareWith = obj as ScrapReason; + return toCompareWith == null ? false : ((this.ScrapReasonId == toCompareWith.ScrapReasonId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the ScrapReasonId field. + public virtual System.Int16 ScrapReasonId + { + get { return _scrapReasonId; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrder.ScrapReason - ScrapReason.WorkOrders (m:1)' + public virtual ISet WorkOrders + { + get { return _workOrders; } + set { _workOrders = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Shift.cs b/src/RawBencher/Model/EntityClasses/Shift.cs new file mode 100644 index 00000000000..3cd12778925 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Shift.cs @@ -0,0 +1,100 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Shift' + public partial class Shift + { + #region Class Member Declarations + private ISet _employeeDepartmentHistories; + private System.TimeSpan _endTime; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Byte _shiftId; + private System.TimeSpan _startTime; + #endregion + + /// Initializes a new instance of the class. + public Shift() : base() + { + _employeeDepartmentHistories = new HashSet(); + _shiftId = default(System.Byte); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ShiftId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + Shift toCompareWith = obj as Shift; + return toCompareWith == null ? false : ((this.ShiftId == toCompareWith.ShiftId)); + } + + + #region Class Property Declarations + /// Gets or sets the EndTime field. + public virtual System.TimeSpan EndTime + { + get { return _endTime; } + set { _endTime = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets the ShiftId field. + public virtual System.Byte ShiftId + { + get { return _shiftId; } + } + + /// Gets or sets the StartTime field. + public virtual System.TimeSpan StartTime + { + get { return _startTime; } + set { _startTime = value; } + } + + /// Represents the navigator which is mapped onto the association 'EmployeeDepartmentHistory.Shift - Shift.EmployeeDepartmentHistories (m:1)' + public virtual ISet EmployeeDepartmentHistories + { + get { return _employeeDepartmentHistories; } + set { _employeeDepartmentHistories = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ShipMethod.cs b/src/RawBencher/Model/EntityClasses/ShipMethod.cs new file mode 100644 index 00000000000..24afc7f045e --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ShipMethod.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ShipMethod' + public partial class ShipMethod + { + #region Class Member Declarations + private ISet _purchaseOrderHeaders; + private ISet _salesOrderHeaders; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Guid _rowguid; + private System.Decimal _shipBase; + private System.Int32 _shipMethodId; + private System.Decimal _shipRate; + #endregion + + /// Initializes a new instance of the class. + public ShipMethod() : base() + { + _purchaseOrderHeaders = new HashSet(); + _salesOrderHeaders = new HashSet(); + _shipMethodId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ShipMethodId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ShipMethod toCompareWith = obj as ShipMethod; + return toCompareWith == null ? false : ((this.ShipMethodId == toCompareWith.ShipMethodId)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the ShipBase field. + public virtual System.Decimal ShipBase + { + get { return _shipBase; } + set { _shipBase = value; } + } + + /// Gets the ShipMethodId field. + public virtual System.Int32 ShipMethodId + { + get { return _shipMethodId; } + } + + /// Gets or sets the ShipRate field. + public virtual System.Decimal ShipRate + { + get { return _shipRate; } + set { _shipRate = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderHeader.ShipMethod - ShipMethod.PurchaseOrderHeaders (m:1)' + public virtual ISet PurchaseOrderHeaders + { + get { return _purchaseOrderHeaders; } + set { _purchaseOrderHeaders = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.ShipMethod - ShipMethod.SalesOrderHeaders (m:1)' + public virtual ISet SalesOrderHeaders + { + get { return _salesOrderHeaders; } + set { _salesOrderHeaders = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/ShoppingCartItem.cs b/src/RawBencher/Model/EntityClasses/ShoppingCartItem.cs new file mode 100644 index 00000000000..cb1adab8263 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/ShoppingCartItem.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'ShoppingCartItem' + public partial class ShoppingCartItem + { + #region Class Member Declarations + private Product _product; + private System.DateTime _dateCreated; + private System.DateTime _modifiedDate; + private System.Int32 _quantity; + private System.String _shoppingCartId; + private System.Int32 _shoppingCartItemId; + #endregion + + /// Initializes a new instance of the class. + public ShoppingCartItem() : base() + { + _shoppingCartItemId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.ShoppingCartItemId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + ShoppingCartItem toCompareWith = obj as ShoppingCartItem; + return toCompareWith == null ? false : ((this.ShoppingCartItemId == toCompareWith.ShoppingCartItemId)); + } + + + #region Class Property Declarations + /// Gets or sets the DateCreated field. + public virtual System.DateTime DateCreated + { + get { return _dateCreated; } + set { _dateCreated = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Quantity field. + public virtual System.Int32 Quantity + { + get { return _quantity; } + set { _quantity = value; } + } + + /// Gets or sets the ShoppingCartId field. + public virtual System.String ShoppingCartId + { + get { return _shoppingCartId; } + set { _shoppingCartId = value; } + } + + /// Gets the ShoppingCartItemId field. + public virtual System.Int32 ShoppingCartItemId + { + get { return _shoppingCartItemId; } + } + + /// Represents the navigator which is mapped onto the association 'ShoppingCartItem.Product - Product.ShoppingCartItems (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SpecialOffer.cs b/src/RawBencher/Model/EntityClasses/SpecialOffer.cs new file mode 100644 index 00000000000..51404e55023 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SpecialOffer.cs @@ -0,0 +1,148 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SpecialOffer' + public partial class SpecialOffer + { + #region Class Member Declarations + private ISet _specialOfferProducts; + private System.String _category; + private System.String _description; + private System.Decimal _discountPct; + private System.DateTime _endDate; + private Nullable _maxQty; + private System.Int32 _minQty; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + private System.Int32 _specialOfferId; + private System.DateTime _startDate; + private System.String _type; + #endregion + + /// Initializes a new instance of the class. + public SpecialOffer() : base() + { + _specialOfferProducts = new HashSet(); + _specialOfferId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.SpecialOfferId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + SpecialOffer toCompareWith = obj as SpecialOffer; + return toCompareWith == null ? false : ((this.SpecialOfferId == toCompareWith.SpecialOfferId)); + } + + + #region Class Property Declarations + /// Gets or sets the Category field. + public virtual System.String Category + { + get { return _category; } + set { _category = value; } + } + + /// Gets or sets the Description field. + public virtual System.String Description + { + get { return _description; } + set { _description = value; } + } + + /// Gets or sets the DiscountPct field. + public virtual System.Decimal DiscountPct + { + get { return _discountPct; } + set { _discountPct = value; } + } + + /// Gets or sets the EndDate field. + public virtual System.DateTime EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the MaxQty field. + public virtual Nullable MaxQty + { + get { return _maxQty; } + set { _maxQty = value; } + } + + /// Gets or sets the MinQty field. + public virtual System.Int32 MinQty + { + get { return _minQty; } + set { _minQty = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets the SpecialOfferId field. + public virtual System.Int32 SpecialOfferId + { + get { return _specialOfferId; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Gets or sets the Type field. + public virtual System.String Type + { + get { return _type; } + set { _type = value; } + } + + /// Represents the navigator which is mapped onto the association 'SpecialOfferProduct.SpecialOffer - SpecialOffer.SpecialOfferProducts (m:1)' + public virtual ISet SpecialOfferProducts + { + get { return _specialOfferProducts; } + set { _specialOfferProducts = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/SpecialOfferProduct.cs b/src/RawBencher/Model/EntityClasses/SpecialOfferProduct.cs new file mode 100644 index 00000000000..4f387fbe879 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/SpecialOfferProduct.cs @@ -0,0 +1,86 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'SpecialOfferProduct' + public partial class SpecialOfferProduct + { + #region Class Member Declarations + private Product _product; + private ISet _salesOrderDetails; + private SpecialOffer _specialOffer; + private System.DateTime _modifiedDate; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public SpecialOfferProduct() : base() + { + _salesOrderDetails = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'SpecialOfferProduct.Product - Product.SpecialOfferProducts (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesOrderDetail.SpecialOfferProduct - SpecialOfferProduct.SalesOrderDetails (m:1)' + public virtual ISet SalesOrderDetails + { + get { return _salesOrderDetails; } + set { _salesOrderDetails = value; } + } + + /// Represents the navigator which is mapped onto the association 'SpecialOfferProduct.SpecialOffer - SpecialOffer.SpecialOfferProducts (m:1)' + public virtual SpecialOffer SpecialOffer + { + get { return _specialOffer; } + set { _specialOffer = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/StateProvince.cs b/src/RawBencher/Model/EntityClasses/StateProvince.cs new file mode 100644 index 00000000000..2676985f89a --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/StateProvince.cs @@ -0,0 +1,133 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'StateProvince' + public partial class StateProvince + { + #region Class Member Declarations + private ISet
_addresses; + private CountryRegion _countryRegion; + private ISet _salesTaxRates; + private SalesTerritory _salesTerritory; + private System.Boolean _isOnlyStateProvinceFlag; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Guid _rowguid; + private System.String _stateProvinceCode; + private System.Int32 _stateProvinceId; + #endregion + + /// Initializes a new instance of the class. + public StateProvince() : base() + { + _addresses = new HashSet
(); + _salesTaxRates = new HashSet(); + _stateProvinceId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.StateProvinceId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + StateProvince toCompareWith = obj as StateProvince; + return toCompareWith == null ? false : ((this.StateProvinceId == toCompareWith.StateProvinceId)); + } + + + #region Class Property Declarations + /// Gets or sets the IsOnlyStateProvinceFlag field. + public virtual System.Boolean IsOnlyStateProvinceFlag + { + get { return _isOnlyStateProvinceFlag; } + set { _isOnlyStateProvinceFlag = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Gets or sets the StateProvinceCode field. + public virtual System.String StateProvinceCode + { + get { return _stateProvinceCode; } + set { _stateProvinceCode = value; } + } + + /// Gets the StateProvinceId field. + public virtual System.Int32 StateProvinceId + { + get { return _stateProvinceId; } + } + + /// Represents the navigator which is mapped onto the association 'Address.StateProvince - StateProvince.Addresses (m:1)' + public virtual ISet
Addresses + { + get { return _addresses; } + set { _addresses = value; } + } + + /// Represents the navigator which is mapped onto the association 'StateProvince.CountryRegion - CountryRegion.StateProvinces (m:1)' + public virtual CountryRegion CountryRegion + { + get { return _countryRegion; } + set { _countryRegion = value; } + } + + /// Represents the navigator which is mapped onto the association 'SalesTaxRate.StateProvince - StateProvince.SalesTaxRates (m:1)' + public virtual ISet SalesTaxRates + { + get { return _salesTaxRates; } + set { _salesTaxRates = value; } + } + + /// Represents the navigator which is mapped onto the association 'StateProvince.SalesTerritory - SalesTerritory.StateProvinces (m:1)' + public virtual SalesTerritory SalesTerritory + { + get { return _salesTerritory; } + set { _salesTerritory = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Store.cs b/src/RawBencher/Model/EntityClasses/Store.cs new file mode 100644 index 00000000000..ee52e9b9e37 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Store.cs @@ -0,0 +1,111 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Store' + public partial class Store + { + #region Class Member Declarations + private BusinessEntity _businessEntity; + private ISet _customers; + private SalesPerson _salesPerson; + private System.Int32 _customerId; + private System.String _demographics; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Guid _rowguid; + #endregion + + /// Initializes a new instance of the class. + public Store() : base() + { + _customers = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.CustomerId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the CustomerId field. + public virtual System.Int32 CustomerId + { + get { return _customerId; } + set { _customerId = value; } + } + + /// Gets or sets the Demographics field. + public virtual System.String Demographics + { + get { return _demographics; } + set { _demographics = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the Rowguid field. + public virtual System.Guid Rowguid + { + get { return _rowguid; } + set { _rowguid = value; } + } + + /// Represents the navigator which is mapped onto the association 'Store.BusinessEntity - BusinessEntity.Store (1:1)' + public virtual BusinessEntity BusinessEntity + { + get { return _businessEntity; } + set { _businessEntity = value; } + } + + /// Represents the navigator which is mapped onto the association 'Customer.Store - Store.Customers (m:1)' + public virtual ISet Customers + { + get { return _customers; } + set { _customers = value; } + } + + /// Represents the navigator which is mapped onto the association 'Store.SalesPerson - SalesPerson.Stores (m:1)' + public virtual SalesPerson SalesPerson + { + get { return _salesPerson; } + set { _salesPerson = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/TransactionHistory.cs b/src/RawBencher/Model/EntityClasses/TransactionHistory.cs new file mode 100644 index 00000000000..ca71eabb6a1 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/TransactionHistory.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'TransactionHistory' + public partial class TransactionHistory + { + #region Class Member Declarations + private Product _product; + private System.Decimal _actualCost; + private System.DateTime _modifiedDate; + private System.Int32 _quantity; + private System.Int32 _referenceOrderId; + private System.Int32 _referenceOrderLineId; + private System.DateTime _transactionDate; + private System.Int32 _transactionId; + private System.String _transactionType; + #endregion + + /// Initializes a new instance of the class. + public TransactionHistory() : base() + { + _transactionId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.TransactionId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + TransactionHistory toCompareWith = obj as TransactionHistory; + return toCompareWith == null ? false : ((this.TransactionId == toCompareWith.TransactionId)); + } + + + #region Class Property Declarations + /// Gets or sets the ActualCost field. + public virtual System.Decimal ActualCost + { + get { return _actualCost; } + set { _actualCost = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Quantity field. + public virtual System.Int32 Quantity + { + get { return _quantity; } + set { _quantity = value; } + } + + /// Gets or sets the ReferenceOrderId field. + public virtual System.Int32 ReferenceOrderId + { + get { return _referenceOrderId; } + set { _referenceOrderId = value; } + } + + /// Gets or sets the ReferenceOrderLineId field. + public virtual System.Int32 ReferenceOrderLineId + { + get { return _referenceOrderLineId; } + set { _referenceOrderLineId = value; } + } + + /// Gets or sets the TransactionDate field. + public virtual System.DateTime TransactionDate + { + get { return _transactionDate; } + set { _transactionDate = value; } + } + + /// Gets the TransactionId field. + public virtual System.Int32 TransactionId + { + get { return _transactionId; } + } + + /// Gets or sets the TransactionType field. + public virtual System.String TransactionType + { + get { return _transactionType; } + set { _transactionType = value; } + } + + /// Represents the navigator which is mapped onto the association 'TransactionHistory.Product - Product.TransactionHistories (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/TransactionHistoryArchive.cs b/src/RawBencher/Model/EntityClasses/TransactionHistoryArchive.cs new file mode 100644 index 00000000000..9ded4f6e42a --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/TransactionHistoryArchive.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'TransactionHistoryArchive' + public partial class TransactionHistoryArchive + { + #region Class Member Declarations + private System.Decimal _actualCost; + private System.DateTime _modifiedDate; + private System.Int32 _productId; + private System.Int32 _quantity; + private System.Int32 _referenceOrderId; + private System.Int32 _referenceOrderLineId; + private System.DateTime _transactionDate; + private System.Int32 _transactionId; + private System.String _transactionType; + #endregion + + /// Initializes a new instance of the class. + public TransactionHistoryArchive() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.TransactionId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + TransactionHistoryArchive toCompareWith = obj as TransactionHistoryArchive; + return toCompareWith == null ? false : ((this.TransactionId == toCompareWith.TransactionId)); + } + + + #region Class Property Declarations + /// Gets or sets the ActualCost field. + public virtual System.Decimal ActualCost + { + get { return _actualCost; } + set { _actualCost = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the ProductId field. + public virtual System.Int32 ProductId + { + get { return _productId; } + set { _productId = value; } + } + + /// Gets or sets the Quantity field. + public virtual System.Int32 Quantity + { + get { return _quantity; } + set { _quantity = value; } + } + + /// Gets or sets the ReferenceOrderId field. + public virtual System.Int32 ReferenceOrderId + { + get { return _referenceOrderId; } + set { _referenceOrderId = value; } + } + + /// Gets or sets the ReferenceOrderLineId field. + public virtual System.Int32 ReferenceOrderLineId + { + get { return _referenceOrderLineId; } + set { _referenceOrderLineId = value; } + } + + /// Gets or sets the TransactionDate field. + public virtual System.DateTime TransactionDate + { + get { return _transactionDate; } + set { _transactionDate = value; } + } + + /// Gets or sets the TransactionId field. + public virtual System.Int32 TransactionId + { + get { return _transactionId; } + set { _transactionId = value; } + } + + /// Gets or sets the TransactionType field. + public virtual System.String TransactionType + { + get { return _transactionType; } + set { _transactionType = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/UnitMeasure.cs b/src/RawBencher/Model/EntityClasses/UnitMeasure.cs new file mode 100644 index 00000000000..ea8650b55e7 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/UnitMeasure.cs @@ -0,0 +1,111 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'UnitMeasure' + public partial class UnitMeasure + { + #region Class Member Declarations + private ISet _billOfMaterials; + private ISet _products; + private ISet _products1; + private ISet _productVendors; + private System.DateTime _modifiedDate; + private System.String _name; + private System.String _unitMeasureCode; + #endregion + + /// Initializes a new instance of the class. + public UnitMeasure() : base() + { + _billOfMaterials = new HashSet(); + _products = new HashSet(); + _products1 = new HashSet(); + _productVendors = new HashSet(); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.UnitMeasureCode.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + UnitMeasure toCompareWith = obj as UnitMeasure; + return toCompareWith == null ? false : ((this.UnitMeasureCode == toCompareWith.UnitMeasureCode)); + } + + + #region Class Property Declarations + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the UnitMeasureCode field. + public virtual System.String UnitMeasureCode + { + get { return _unitMeasureCode; } + set { _unitMeasureCode = value; } + } + + /// Represents the navigator which is mapped onto the association 'BillOfMaterial.UnitMeasure - UnitMeasure.BillOfMaterials (m:1)' + public virtual ISet BillOfMaterials + { + get { return _billOfMaterials; } + set { _billOfMaterials = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.UnitMeasure - UnitMeasure.Products (m:1)' + public virtual ISet Products + { + get { return _products; } + set { _products = value; } + } + + /// Represents the navigator which is mapped onto the association 'Product.UnitMeasure1 - UnitMeasure.Products1 (m:1)' + public virtual ISet Products1 + { + get { return _products1; } + set { _products1 = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductVendor.UnitMeasure - UnitMeasure.ProductVendors (m:1)' + public virtual ISet ProductVendors + { + get { return _productVendors; } + set { _productVendors = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/Vendor.cs b/src/RawBencher/Model/EntityClasses/Vendor.cs new file mode 100644 index 00000000000..27d43820be9 --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/Vendor.cs @@ -0,0 +1,136 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'Vendor' + public partial class Vendor + { + #region Class Member Declarations + private BusinessEntity _businessEntity; + private ISet _productVendors; + private ISet _purchaseOrderHeaders; + private System.String _accountNumber; + private System.Boolean _activeFlag; + private System.Byte _creditRating; + private System.DateTime _modifiedDate; + private System.String _name; + private System.Boolean _preferredVendorStatus; + private System.String _purchasingWebServiceUrl; + private System.Int32 _vendorId; + #endregion + + /// Initializes a new instance of the class. + public Vendor() : base() + { + _productVendors = new HashSet(); + _purchaseOrderHeaders = new HashSet(); + _vendorId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.VendorId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the AccountNumber field. + public virtual System.String AccountNumber + { + get { return _accountNumber; } + set { _accountNumber = value; } + } + + /// Gets or sets the ActiveFlag field. + public virtual System.Boolean ActiveFlag + { + get { return _activeFlag; } + set { _activeFlag = value; } + } + + /// Gets or sets the CreditRating field. + public virtual System.Byte CreditRating + { + get { return _creditRating; } + set { _creditRating = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the Name field. + public virtual System.String Name + { + get { return _name; } + set { _name = value; } + } + + /// Gets or sets the PreferredVendorStatus field. + public virtual System.Boolean PreferredVendorStatus + { + get { return _preferredVendorStatus; } + set { _preferredVendorStatus = value; } + } + + /// Gets or sets the PurchasingWebServiceUrl field. + public virtual System.String PurchasingWebServiceUrl + { + get { return _purchasingWebServiceUrl; } + set { _purchasingWebServiceUrl = value; } + } + + /// Gets the VendorId field. + public virtual System.Int32 VendorId + { + get { return _vendorId; } + } + + /// Represents the navigator which is mapped onto the association 'Vendor.BusinessEntity - BusinessEntity.Vendor (1:1)' + public virtual BusinessEntity BusinessEntity + { + get { return _businessEntity; } + set { _businessEntity = value; } + } + + /// Represents the navigator which is mapped onto the association 'ProductVendor.Vendor - Vendor.ProductVendors (m:1)' + public virtual ISet ProductVendors + { + get { return _productVendors; } + set { _productVendors = value; } + } + + /// Represents the navigator which is mapped onto the association 'PurchaseOrderHeader.Vendor - Vendor.PurchaseOrderHeaders (m:1)' + public virtual ISet PurchaseOrderHeaders + { + get { return _purchaseOrderHeaders; } + set { _purchaseOrderHeaders = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/WorkOrder.cs b/src/RawBencher/Model/EntityClasses/WorkOrder.cs new file mode 100644 index 00000000000..9297fa5ee3e --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/WorkOrder.cs @@ -0,0 +1,140 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'WorkOrder' + public partial class WorkOrder + { + #region Class Member Declarations + private Product _product; + private ScrapReason _scrapReason; + private ISet _workOrderRoutings; + private System.DateTime _dueDate; + private Nullable _endDate; + private System.DateTime _modifiedDate; + private System.Int32 _orderQty; + private System.Int16 _scrappedQty; + private System.DateTime _startDate; + private System.Int32 _stockedQty; + private System.Int32 _workOrderId; + #endregion + + /// Initializes a new instance of the class. + public WorkOrder() : base() + { + _workOrderRoutings = new HashSet(); + _stockedQty = default(System.Int32); + _workOrderId = default(System.Int32); + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + toReturn ^= this.WorkOrderId.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + if(obj == null) + { + return false; + } + WorkOrder toCompareWith = obj as WorkOrder; + return toCompareWith == null ? false : ((this.WorkOrderId == toCompareWith.WorkOrderId)); + } + + + #region Class Property Declarations + /// Gets or sets the DueDate field. + public virtual System.DateTime DueDate + { + get { return _dueDate; } + set { _dueDate = value; } + } + + /// Gets or sets the EndDate field. + public virtual Nullable EndDate + { + get { return _endDate; } + set { _endDate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OrderQty field. + public virtual System.Int32 OrderQty + { + get { return _orderQty; } + set { _orderQty = value; } + } + + /// Gets or sets the ScrappedQty field. + public virtual System.Int16 ScrappedQty + { + get { return _scrappedQty; } + set { _scrappedQty = value; } + } + + /// Gets or sets the StartDate field. + public virtual System.DateTime StartDate + { + get { return _startDate; } + set { _startDate = value; } + } + + /// Gets the StockedQty field. + public virtual System.Int32 StockedQty + { + get { return _stockedQty; } + } + + /// Gets the WorkOrderId field. + public virtual System.Int32 WorkOrderId + { + get { return _workOrderId; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrder.Product - Product.WorkOrders (m:1)' + public virtual Product Product + { + get { return _product; } + set { _product = value; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrder.ScrapReason - ScrapReason.WorkOrders (m:1)' + public virtual ScrapReason ScrapReason + { + get { return _scrapReason; } + set { _scrapReason = value; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrderRouting.WorkOrder - WorkOrder.WorkOrderRoutings (m:1)' + public virtual ISet WorkOrderRoutings + { + get { return _workOrderRoutings; } + set { _workOrderRoutings = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/EntityClasses/WorkOrderRouting.cs b/src/RawBencher/Model/EntityClasses/WorkOrderRouting.cs new file mode 100644 index 00000000000..9476c72df5e --- /dev/null +++ b/src/RawBencher/Model/EntityClasses/WorkOrderRouting.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.ComponentModel; +using System.Collections.Generic; + +namespace NH.Bencher.EntityClasses +{ + /// Class which represents the entity 'WorkOrderRouting' + public partial class WorkOrderRouting + { + #region Class Member Declarations + private Location _location; + private WorkOrder _workOrder; + private Nullable _actualCost; + private Nullable _actualEndDate; + private Nullable _actualResourceHrs; + private Nullable _actualStartDate; + private System.DateTime _modifiedDate; + private System.Int16 _operationSequence; + private System.Decimal _plannedCost; + private System.Int32 _productId; + private System.DateTime _scheduledEndDate; + private System.DateTime _scheduledStartDate; + #endregion + + /// Initializes a new instance of the class. + public WorkOrderRouting() : base() + { + OnCreated(); + } + + /// Method called from the constructor + partial void OnCreated(); + + /// Returns a hash code for this instance. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + int toReturn = base.GetHashCode(); + return toReturn; + } + + /// Determines whether the specified object is equal to this instance. + /// The to compare with this instance. + /// true if the specified is equal to this instance; otherwise, false. + public override bool Equals(object obj) + { + return object.ReferenceEquals(this, obj); + } + + + #region Class Property Declarations + /// Gets or sets the ActualCost field. + public virtual Nullable ActualCost + { + get { return _actualCost; } + set { _actualCost = value; } + } + + /// Gets or sets the ActualEndDate field. + public virtual Nullable ActualEndDate + { + get { return _actualEndDate; } + set { _actualEndDate = value; } + } + + /// Gets or sets the ActualResourceHrs field. + public virtual Nullable ActualResourceHrs + { + get { return _actualResourceHrs; } + set { _actualResourceHrs = value; } + } + + /// Gets or sets the ActualStartDate field. + public virtual Nullable ActualStartDate + { + get { return _actualStartDate; } + set { _actualStartDate = value; } + } + + /// Gets or sets the ModifiedDate field. + public virtual System.DateTime ModifiedDate + { + get { return _modifiedDate; } + set { _modifiedDate = value; } + } + + /// Gets or sets the OperationSequence field. + public virtual System.Int16 OperationSequence + { + get { return _operationSequence; } + set { _operationSequence = value; } + } + + /// Gets or sets the PlannedCost field. + public virtual System.Decimal PlannedCost + { + get { return _plannedCost; } + set { _plannedCost = value; } + } + + /// Gets or sets the ProductId field. + public virtual System.Int32 ProductId + { + get { return _productId; } + set { _productId = value; } + } + + /// Gets or sets the ScheduledEndDate field. + public virtual System.DateTime ScheduledEndDate + { + get { return _scheduledEndDate; } + set { _scheduledEndDate = value; } + } + + /// Gets or sets the ScheduledStartDate field. + public virtual System.DateTime ScheduledStartDate + { + get { return _scheduledStartDate; } + set { _scheduledStartDate = value; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrderRouting.Location - Location.WorkOrderRoutings (m:1)' + public virtual Location Location + { + get { return _location; } + set { _location = value; } + } + + /// Represents the navigator which is mapped onto the association 'WorkOrderRouting.WorkOrder - WorkOrder.WorkOrderRoutings (m:1)' + public virtual WorkOrder WorkOrder + { + get { return _workOrder; } + set { _workOrder = value; } + } + + #endregion + } +} diff --git a/src/RawBencher/Model/NH.Bencher.Model.csproj b/src/RawBencher/Model/NH.Bencher.Model.csproj new file mode 100644 index 00000000000..1aff85730e6 --- /dev/null +++ b/src/RawBencher/Model/NH.Bencher.Model.csproj @@ -0,0 +1,256 @@ + + + + Debug + AnyCPU + 9.0.30703 + 2.0 + {45DAEB56-B84D-4D7A-BF22-293F1CE07DBB} + Library + Properties + NH.Bencher + NH.Bencher.Model + v4.6.1 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\ReferencedAssemblies\Microsoft.SqlServer.Types.dll + + + + + + + + + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + + \ No newline at end of file diff --git a/src/RawBencher/Model/Properties/AssemblyInfo.cs b/src/RawBencher/Model/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..37f90e89ba7 --- /dev/null +++ b/src/RawBencher/Model/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/RawBencher/Persistence/EntityMappings/Address.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Address.hbm.xml new file mode 100644 index 00000000000..e0090b22b28 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Address.hbm.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/AddressType.hbm.xml b/src/RawBencher/Persistence/EntityMappings/AddressType.hbm.xml new file mode 100644 index 00000000000..b629cc0a659 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/AddressType.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/BillOfMaterial.hbm.xml b/src/RawBencher/Persistence/EntityMappings/BillOfMaterial.hbm.xml new file mode 100644 index 00000000000..49974ebe618 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/BillOfMaterial.hbm.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/BusinessEntity.hbm.xml b/src/RawBencher/Persistence/EntityMappings/BusinessEntity.hbm.xml new file mode 100644 index 00000000000..215644f2044 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/BusinessEntity.hbm.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/BusinessEntityAddress.hbm.xml b/src/RawBencher/Persistence/EntityMappings/BusinessEntityAddress.hbm.xml new file mode 100644 index 00000000000..990f2c42b86 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/BusinessEntityAddress.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/BusinessEntityContact.hbm.xml b/src/RawBencher/Persistence/EntityMappings/BusinessEntityContact.hbm.xml new file mode 100644 index 00000000000..5db83c3a393 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/BusinessEntityContact.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ContactCreditCard.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ContactCreditCard.hbm.xml new file mode 100644 index 00000000000..2bc927ee115 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ContactCreditCard.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ContactType.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ContactType.hbm.xml new file mode 100644 index 00000000000..f6b62a4f57f --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ContactType.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/CountryRegion.hbm.xml b/src/RawBencher/Persistence/EntityMappings/CountryRegion.hbm.xml new file mode 100644 index 00000000000..e85e513182d --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/CountryRegion.hbm.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/CountryRegionCurrency.hbm.xml b/src/RawBencher/Persistence/EntityMappings/CountryRegionCurrency.hbm.xml new file mode 100644 index 00000000000..d89b76c4d0a --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/CountryRegionCurrency.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/CreditCard.hbm.xml b/src/RawBencher/Persistence/EntityMappings/CreditCard.hbm.xml new file mode 100644 index 00000000000..f9ac7a6d8b7 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/CreditCard.hbm.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Culture.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Culture.hbm.xml new file mode 100644 index 00000000000..57f4da18dfa --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Culture.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Currency.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Currency.hbm.xml new file mode 100644 index 00000000000..7c736179cc5 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Currency.hbm.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/CurrencyRate.hbm.xml b/src/RawBencher/Persistence/EntityMappings/CurrencyRate.hbm.xml new file mode 100644 index 00000000000..37449ca7dd1 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/CurrencyRate.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Customer.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Customer.hbm.xml new file mode 100644 index 00000000000..1d360a2cfd9 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Customer.hbm.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Department.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Department.hbm.xml new file mode 100644 index 00000000000..987b1ed4979 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Department.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Document.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Document.hbm.xml new file mode 100644 index 00000000000..4de232a931c --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Document.hbm.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/EmailAddress.hbm.xml b/src/RawBencher/Persistence/EntityMappings/EmailAddress.hbm.xml new file mode 100644 index 00000000000..aa2fb38b413 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/EmailAddress.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Employee.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Employee.hbm.xml new file mode 100644 index 00000000000..0ca7252598a --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Employee.hbm.xml @@ -0,0 +1,62 @@ + + + + + + + Person + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/EmployeeDepartmentHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/EmployeeDepartmentHistory.hbm.xml new file mode 100644 index 00000000000..60c46c7569d --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/EmployeeDepartmentHistory.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/EmployeePayHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/EmployeePayHistory.hbm.xml new file mode 100644 index 00000000000..126583b4fa4 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/EmployeePayHistory.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Illustration.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Illustration.hbm.xml new file mode 100644 index 00000000000..75da6f5708c --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Illustration.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/JobCandidate.hbm.xml b/src/RawBencher/Persistence/EntityMappings/JobCandidate.hbm.xml new file mode 100644 index 00000000000..ecd72ea9763 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/JobCandidate.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Location.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Location.hbm.xml new file mode 100644 index 00000000000..05935dbc1c0 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Location.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Password.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Password.hbm.xml new file mode 100644 index 00000000000..1796c4aa14c --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Password.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + Person + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Person.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Person.hbm.xml new file mode 100644 index 00000000000..bfae9156a91 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Person.hbm.xml @@ -0,0 +1,60 @@ + + + + + + + BusinessEntity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/PersonPhone.hbm.xml b/src/RawBencher/Persistence/EntityMappings/PersonPhone.hbm.xml new file mode 100644 index 00000000000..ba81238acf4 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/PersonPhone.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/PhoneNumberType.hbm.xml b/src/RawBencher/Persistence/EntityMappings/PhoneNumberType.hbm.xml new file mode 100644 index 00000000000..6acd3c97606 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/PhoneNumberType.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Product.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Product.hbm.xml new file mode 100644 index 00000000000..f4d08aab326 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Product.hbm.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductCategory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductCategory.hbm.xml new file mode 100644 index 00000000000..a69bd928ea0 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductCategory.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductCostHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductCostHistory.hbm.xml new file mode 100644 index 00000000000..cf617177503 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductCostHistory.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductDescription.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductDescription.hbm.xml new file mode 100644 index 00000000000..f510c21d76c --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductDescription.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductDocument.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductDocument.hbm.xml new file mode 100644 index 00000000000..db2df270b0d --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductDocument.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductInventory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductInventory.hbm.xml new file mode 100644 index 00000000000..1402cb4af48 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductInventory.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductListPriceHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductListPriceHistory.hbm.xml new file mode 100644 index 00000000000..04cdb8f8db4 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductListPriceHistory.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductModel.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductModel.hbm.xml new file mode 100644 index 00000000000..44e5b7cc519 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductModel.hbm.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductModelIllustration.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductModelIllustration.hbm.xml new file mode 100644 index 00000000000..9129c60ef6b --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductModelIllustration.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductModelProductDescriptionCulture.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductModelProductDescriptionCulture.hbm.xml new file mode 100644 index 00000000000..118b709789e --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductModelProductDescriptionCulture.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductPhoto.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductPhoto.hbm.xml new file mode 100644 index 00000000000..883664dcc4e --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductPhoto.hbm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductProductPhoto.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductProductPhoto.hbm.xml new file mode 100644 index 00000000000..abee39532a3 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductProductPhoto.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductReview.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductReview.hbm.xml new file mode 100644 index 00000000000..4a501154d13 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductReview.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductSubcategory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductSubcategory.hbm.xml new file mode 100644 index 00000000000..5e60d66f183 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductSubcategory.hbm.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ProductVendor.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ProductVendor.hbm.xml new file mode 100644 index 00000000000..aaa9cb76095 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ProductVendor.hbm.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/PurchaseOrderDetail.hbm.xml b/src/RawBencher/Persistence/EntityMappings/PurchaseOrderDetail.hbm.xml new file mode 100644 index 00000000000..2e1011821af --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/PurchaseOrderDetail.hbm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/PurchaseOrderHeader.hbm.xml b/src/RawBencher/Persistence/EntityMappings/PurchaseOrderHeader.hbm.xml new file mode 100644 index 00000000000..f00bec6e2e9 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/PurchaseOrderHeader.hbm.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesOrderDetail.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesOrderDetail.hbm.xml new file mode 100644 index 00000000000..6c383ef4044 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesOrderDetail.hbm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesOrderHeader.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesOrderHeader.hbm.xml new file mode 100644 index 00000000000..4cb4188f449 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesOrderHeader.hbm.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesOrderHeaderSalesReason.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesOrderHeaderSalesReason.hbm.xml new file mode 100644 index 00000000000..3b113fb689c --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesOrderHeaderSalesReason.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesPerson.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesPerson.hbm.xml new file mode 100644 index 00000000000..ab6bd133b3a --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesPerson.hbm.xml @@ -0,0 +1,50 @@ + + + + + + + Employee + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesPersonQuotaHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesPersonQuotaHistory.hbm.xml new file mode 100644 index 00000000000..fc993fd792c --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesPersonQuotaHistory.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesReason.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesReason.hbm.xml new file mode 100644 index 00000000000..b178be40f22 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesReason.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesTaxRate.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesTaxRate.hbm.xml new file mode 100644 index 00000000000..101763edb32 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesTaxRate.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesTerritory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesTerritory.hbm.xml new file mode 100644 index 00000000000..e29179826e0 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesTerritory.hbm.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SalesTerritoryHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SalesTerritoryHistory.hbm.xml new file mode 100644 index 00000000000..9628d2bec25 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SalesTerritoryHistory.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ScrapReason.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ScrapReason.hbm.xml new file mode 100644 index 00000000000..f1fa15fe18f --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ScrapReason.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Shift.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Shift.hbm.xml new file mode 100644 index 00000000000..d26374785ed --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Shift.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ShipMethod.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ShipMethod.hbm.xml new file mode 100644 index 00000000000..3a0e7176f4f --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ShipMethod.hbm.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/ShoppingCartItem.hbm.xml b/src/RawBencher/Persistence/EntityMappings/ShoppingCartItem.hbm.xml new file mode 100644 index 00000000000..3b294523f19 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/ShoppingCartItem.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SpecialOffer.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SpecialOffer.hbm.xml new file mode 100644 index 00000000000..ab462096a2f --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SpecialOffer.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/SpecialOfferProduct.hbm.xml b/src/RawBencher/Persistence/EntityMappings/SpecialOfferProduct.hbm.xml new file mode 100644 index 00000000000..9f13865371d --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/SpecialOfferProduct.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/StateProvince.hbm.xml b/src/RawBencher/Persistence/EntityMappings/StateProvince.hbm.xml new file mode 100644 index 00000000000..6a11832b0ca --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/StateProvince.hbm.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Store.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Store.hbm.xml new file mode 100644 index 00000000000..862a0c42e6b --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Store.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + BusinessEntity + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/TransactionHistory.hbm.xml b/src/RawBencher/Persistence/EntityMappings/TransactionHistory.hbm.xml new file mode 100644 index 00000000000..eeb52608f0b --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/TransactionHistory.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/TransactionHistoryArchive.hbm.xml b/src/RawBencher/Persistence/EntityMappings/TransactionHistoryArchive.hbm.xml new file mode 100644 index 00000000000..e2b82b15649 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/TransactionHistoryArchive.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/UnitMeasure.hbm.xml b/src/RawBencher/Persistence/EntityMappings/UnitMeasure.hbm.xml new file mode 100644 index 00000000000..3da520437d0 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/UnitMeasure.hbm.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/Vendor.hbm.xml b/src/RawBencher/Persistence/EntityMappings/Vendor.hbm.xml new file mode 100644 index 00000000000..df438c5efc3 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/Vendor.hbm.xml @@ -0,0 +1,35 @@ + + + + + + + BusinessEntity + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/WorkOrder.hbm.xml b/src/RawBencher/Persistence/EntityMappings/WorkOrder.hbm.xml new file mode 100644 index 00000000000..1e11955bb63 --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/WorkOrder.hbm.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/EntityMappings/WorkOrderRouting.hbm.xml b/src/RawBencher/Persistence/EntityMappings/WorkOrderRouting.hbm.xml new file mode 100644 index 00000000000..3059ca9d2ba --- /dev/null +++ b/src/RawBencher/Persistence/EntityMappings/WorkOrderRouting.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/NH.Bencher.Persistence.csproj b/src/RawBencher/Persistence/NH.Bencher.Persistence.csproj new file mode 100644 index 00000000000..f340336b8d0 --- /dev/null +++ b/src/RawBencher/Persistence/NH.Bencher.Persistence.csproj @@ -0,0 +1,271 @@ + + + + Debug + AnyCPU + 9.0.30703 + 2.0 + {3E9CA88C-03EC-445A-960A-242511B6EF55} + Library + Properties + NH.Bencher + NH.Bencher.Persistence + v4.6.1 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\packages\Antlr3.Runtime.3.5.1\lib\net40-client\Antlr3.Runtime.dll + + + + + + + + + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + + + LLBLGen Pro + PreserveNewest + + + LLBLGen Pro + + + LLBLGen Pro + + + + + {5909bfe7-93cf-4e5f-be22-6293368af01d} + NHibernate + + + + \ No newline at end of file diff --git a/src/RawBencher/Persistence/Properties/AssemblyInfo.cs b/src/RawBencher/Persistence/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..37f90e89ba7 --- /dev/null +++ b/src/RawBencher/Persistence/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/RawBencher/Persistence/SessionManager.cs b/src/RawBencher/Persistence/SessionManager.cs new file mode 100644 index 00000000000..5cc7bfd17c9 --- /dev/null +++ b/src/RawBencher/Persistence/SessionManager.cs @@ -0,0 +1,131 @@ +//------------------------------------------------------------------------------ +// This code was generated by LLBLGen Pro v4.2. +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Diagnostics; +using NHibernate; +using Configuration = NHibernate.Cfg.Configuration; + +namespace NH.Bencher +{ + /// Small, simple session manager class which initializes NHibernate's session factory and loads the configuration. + public static partial class SessionManager + { + #region Class Member Declarations + public static long LastTotalMemoryUsage; + + private static readonly ISessionFactory _sessionFactory; + + private static long _memoryInitial; + private static long _memoryPrevios; + private static int _index; + + #endregion + + public static List Factories = new List(); + + /// Initializes the class. + static SessionManager() + { + const int numberOfSessionFactories = 3; + //var conf = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + //Console.WriteLine("App.config path: " + conf.FilePath); + + //int.TryParse(System.Configuration.ConfigurationManager.AppSettings["SessionFactories"], out count); + Console.WriteLine("Number of active session factories: " + numberOfSessionFactories); + + ForceCollect(); + _memoryInitial = GC.GetTotalMemory(true); + + Console.WriteLine(); + Console.WriteLine(); + + for (_index = 0; _index < numberOfSessionFactories; ++_index) + { + { + var configuration = new Configuration(); + configuration.Configure(); + configuration.AddAssembly(typeof(SessionManager).Assembly); + using (Timer.Start) + { + Factories.Add(configuration.BuildSessionFactory()); + } + } + Console.WriteLine($"Time taken by session factory #{_index} creation: " + TimeSpan.FromMilliseconds(Timer.ElapsedMilliseconds)); + + ForceCollect(); + ShowMemory(); + } + + Console.WriteLine(); + Console.WriteLine(); + _sessionFactory = Factories[0]; + + } + + private static void ShowMemory() + { + Console.WriteLine(); + + var totalMemory = GC.GetTotalMemory(true); + var taken = totalMemory - _memoryInitial; + _memoryPrevios = taken; + Console.WriteLine($"Memory allocated by all session factories in current app domain: {ToKbSize(taken)}."); + LastTotalMemoryUsage = taken; + Console.WriteLine(); + } + + private static string ToKbSize(long bytes) + { + return (bytes / 1024.0).ToString("0,0.00") + " Kb"; + } + + private static void ForceCollect() + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + } + + /// Opens a new session on the existing session factory + /// ready to use ISession instance + /// Dispose this instance after you're done with the instance, so after lazy loading has occured. The returned + /// ISession instance is not thread safe. + public static ISession OpenSession() + { + return _sessionFactory.OpenSession(); + } + + #region Class Property Declarations + /// Gets the session factory created from the initialized configuration. The returned factory is thread safe. + public static ISessionFactory SessionFactory + { + get { return _sessionFactory; } + } + #endregion + } + + /// + /// Stopwatch wrapper + /// + public class Timer : IDisposable + { + static readonly Stopwatch Stopwatch = new Stopwatch(); + + public Timer() + { + Stopwatch.Reset(); + Stopwatch.Start(); + } + + public static Timer Start { get { return new Timer(); } } + + public void Dispose() + { + Stopwatch.Stop(); + } + + public static long ElapsedMilliseconds { get { return Stopwatch.ElapsedMilliseconds; } } + } +} diff --git a/src/RawBencher/Persistence/app.config b/src/RawBencher/Persistence/app.config new file mode 100644 index 00000000000..2b344326dd7 --- /dev/null +++ b/src/RawBencher/Persistence/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/RawBencher/Persistence/hibernate.cfg.xml b/src/RawBencher/Persistence/hibernate.cfg.xml new file mode 100644 index 00000000000..168142fc1ac --- /dev/null +++ b/src/RawBencher/Persistence/hibernate.cfg.xml @@ -0,0 +1,10 @@ + + + + NHibernate.Connection.DriverConnectionProvider + NHibernate.Dialect.MsSql2012Dialect + NHibernate.Driver.SqlClientDriver + AdventureWorks.ConnectionString.SQL Server (SqlClient) + false + + From 0b5700f4743577c4303ba46dedadac6a5a51bedd Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Fri, 5 Jan 2018 22:10:14 +0530 Subject: [PATCH 2/2] Draft for intern --- src/NHibernate/Cfg/Environment.cs | 55 ++++++++++- .../Dialect/Lock/SelectLockingStrategy.cs | 4 +- src/NHibernate/Loader/BasicLoader.cs | 8 +- src/NHibernate/Loader/DefaultEntityAliases.cs | 45 +++++++-- .../Loader/Entity/CascadeEntityLoader.cs | 2 + src/NHibernate/Loader/Entity/EntityLoader.cs | 2 + src/NHibernate/Mapping/Collection.cs | 2 +- src/NHibernate/Mapping/Column.cs | 69 +++++++------- src/NHibernate/Mapping/OneToMany.cs | 5 +- src/NHibernate/Mapping/PersistentClass.cs | 6 +- src/NHibernate/Mapping/Property.cs | 2 +- .../Proxy/DynamicProxy/ProxyFactory.cs | 7 +- .../Proxy/NHibernateProxyBuilder.cs | 11 ++- .../SqlCommand/SqlSimpleSelectBuilder.cs | 15 ++- src/NHibernate/SqlCommand/SqlString.cs | 27 +++++- src/NHibernate/SqlCommand/SqlStringBuilder.cs | 5 + src/NHibernate/Util/StringHelper.cs | 91 +++++++++++++++++++ 17 files changed, 288 insertions(+), 68 deletions(-) diff --git a/src/NHibernate/Cfg/Environment.cs b/src/NHibernate/Cfg/Environment.cs index ce55bead051..d444134dfe5 100644 --- a/src/NHibernate/Cfg/Environment.cs +++ b/src/NHibernate/Cfg/Environment.cs @@ -270,12 +270,15 @@ public static string Version /// public const string TrackSessionId = "track_session_id"; + public const string StringMetadataInternLevel = "intern_level"; + private static readonly Dictionary GlobalProperties; private static IBytecodeProvider BytecodeProviderInstance; private static bool EnableReflectionOptimizer; - + private static readonly INHibernateLogger log = NHibernateLogger.For(typeof(Environment)); + private static InternLevel _internLevel; /// /// Issue warnings to user when any obsolete property names are used. @@ -299,6 +302,9 @@ static Environment() BytecodeProviderInstance = BuildBytecodeProvider(GlobalProperties); EnableReflectionOptimizer = PropertiesHelper.GetBoolean(PropertyUseReflectionOptimizer, GlobalProperties); + + //TODO: Proper configuration + SetInternLevelFromConfig(); if (EnableReflectionOptimizer) { @@ -306,6 +312,27 @@ static Environment() } } + //TODO: + private static InternLevel SetInternLevelFromConfig() + { + return InternLevel.Default; + //string value = System.Configuration.ConfigurationManager.AppSettings["InternLevel"]; + //Console.WriteLine("Path to config file: " + ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath); + + //if (string.IsNullOrEmpty(value)) + //{ + // return InternLevel.Default; + //} + + //if (!Enum.TryParse(value, true, out var valueParsed)) + //{ + // Console.WriteLine("Intern level setting is invalid: " + value); + //} + //Console.WriteLine("Intern level " + valueParsed); + //Console.WriteLine(); + //return valueParsed; + } + private static void LoadGlobalPropertiesFromAppConfig() { object config = ConfigurationManager.GetSection(CfgXmlHelper.CfgSectionName); @@ -388,6 +415,32 @@ public static IBytecodeProvider BytecodeProvider set { BytecodeProviderInstance = value; } } + /// + /// The bytecode provider to use. + /// + /// + /// This property is read from the <nhibernate> section + /// of the application configuration file by default. Since it is not + /// always convenient to configure NHibernate through the application + /// configuration file, it is also possible to set the property value + /// manually. This should only be done before a configuration object + /// is created, otherwise the change may not take effect. + /// + public static InternLevel InternLevel + { + get { return _internLevel; } + set + { + + if (value != _internLevel) + { + Console.WriteLine("Intern level " + value); + } + _internLevel = value; + + } + } + /// /// Whether to enable the use of reflection optimizer /// diff --git a/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs b/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs index ed696ce67b9..faf9d990b61 100644 --- a/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs +++ b/src/NHibernate/Dialect/Lock/SelectLockingStrategy.cs @@ -47,7 +47,7 @@ private SqlString GenerateLockString() { select.SetComment(lockMode + " lock " + lockable.EntityName); } - return select.ToSqlString(); + return select.ToSqlString(true); } #region ILockingStrategy Members @@ -110,4 +110,4 @@ public void Lock(object id, object version, object obj, ISessionImplementor sess #endregion } -} \ No newline at end of file +} diff --git a/src/NHibernate/Loader/BasicLoader.cs b/src/NHibernate/Loader/BasicLoader.cs index 1e2055329cc..5d9aaa49d70 100644 --- a/src/NHibernate/Loader/BasicLoader.cs +++ b/src/NHibernate/Loader/BasicLoader.cs @@ -13,7 +13,7 @@ public abstract class BasicLoader : Loader private IEntityAliases[] descriptors; private ICollectionAliases[] collectionDescriptors; - public BasicLoader(ISessionFactoryImplementor factory) : base(factory) {} + public BasicLoader(ISessionFactoryImplementor factory) : base(factory) { } protected override sealed IEntityAliases[] EntityAliases { @@ -28,6 +28,8 @@ protected override sealed ICollectionAliases[] CollectionAliases protected abstract string[] Suffixes { get; } protected abstract string[] CollectionSuffixes { get; } + protected virtual bool InternStringMetadata => false; + protected override void PostInstantiate() { ILoadable[] persisters = EntityPersisters; @@ -35,7 +37,7 @@ protected override void PostInstantiate() descriptors = new IEntityAliases[persisters.Length]; for (int i = 0; i < descriptors.Length; i++) { - descriptors[i] = new DefaultEntityAliases(persisters[i], suffixes[i]); + descriptors[i] = new DefaultEntityAliases(persisters[i], suffixes[i], InternStringMetadata); } ICollectionPersister[] collectionPersisters = CollectionPersisters; @@ -69,7 +71,7 @@ protected override void PostInstantiate() private static bool IsBag(ICollectionPersister collectionPersister) { var type = collectionPersister.CollectionType.GetType(); - return type.IsGenericType && type.GetGenericTypeDefinition() == typeof (GenericBagType<>); + return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(GenericBagType<>); } /// diff --git a/src/NHibernate/Loader/DefaultEntityAliases.cs b/src/NHibernate/Loader/DefaultEntityAliases.cs index 8ff8a43e65f..fb74056f446 100644 --- a/src/NHibernate/Loader/DefaultEntityAliases.cs +++ b/src/NHibernate/Loader/DefaultEntityAliases.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using NHibernate.Persister.Entity; +using NHibernate.Util; namespace NHibernate.Loader { @@ -34,6 +35,34 @@ public DefaultEntityAliases(IDictionary userProvidedAliases, I //rowIdAlias is generated on demand in property } + /// + /// Calculate and cache select-clause aliases. + /// + public DefaultEntityAliases(ILoadable persister, string suffix, bool internAliases) : this(persister, suffix) + { + if (internAliases == false) + return; + + const InternLevel internLevel = InternLevel.EntityAlias; + + SuffixedKeyAliases = StringHelper.Intern(SuffixedKeyAliases, internLevel); + SuffixedPropertyAliases = InternPropertiesAliases(SuffixedPropertyAliases, internLevel); + SuffixedVersionAliases = StringHelper.Intern(SuffixedVersionAliases, internLevel); + SuffixedDiscriminatorAlias = StringHelper.Intern(SuffixedDiscriminatorAlias, internLevel); + if (persister.HasRowId) + RowIdAlias = StringHelper.Intern(RowIdAlias, internLevel); + } + + private string[][] InternPropertiesAliases(string[][] propertiesAliases, InternLevel internLevel) + { + foreach (string[] values in propertiesAliases) + { + StringHelper.Intern(values, internLevel); + } + + return propertiesAliases; + } + /// /// Returns aliases for subclass persister /// @@ -63,7 +92,11 @@ public string[][] GetSuffixedPropertyAliases(ILoadable persister) public string[] SuffixedKeyAliases { get; } // TODO: not visible to the user! - public string RowIdAlias => _rowIdAlias ?? (_rowIdAlias = Loadable.RowIdAlias + _suffix); + public string RowIdAlias + { + get => _rowIdAlias ?? (_rowIdAlias = Loadable.RowIdAlias + _suffix); + private set => _rowIdAlias = value; + } /// /// Returns default aliases for all the properties @@ -100,7 +133,7 @@ private string[] DetermineKeyAliases(ILoadable persister) if (_userProvidedAliases != null) { var result = SafeGetUserProvidedAliases(persister.IdentifierPropertyName) ?? - GetUserProvidedAliases(EntityPersister.EntityID); + GetUserProvidedAliases(EntityPersister.EntityID); if (result != null) return result; @@ -108,24 +141,24 @@ private string[] DetermineKeyAliases(ILoadable persister) return GetIdentifierAliases(persister, _suffix); } - + private string[][] DeterminePropertyAliases(ILoadable persister) { return GetSuffixedPropertyAliases(persister); } - + private string DetermineDiscriminatorAlias(ILoadable persister) { if (_userProvidedAliases != null) { var columns = GetUserProvidedAliases(AbstractEntityPersister.EntityClass); - if (columns != null) + if (columns != null) return columns[0]; } return GetDiscriminatorAlias(persister, _suffix); } - + private string[] SafeGetUserProvidedAliases(string propertyPath) { if (propertyPath == null) diff --git a/src/NHibernate/Loader/Entity/CascadeEntityLoader.cs b/src/NHibernate/Loader/Entity/CascadeEntityLoader.cs index a30bf394100..856efa406fd 100644 --- a/src/NHibernate/Loader/Entity/CascadeEntityLoader.cs +++ b/src/NHibernate/Loader/Entity/CascadeEntityLoader.cs @@ -16,5 +16,7 @@ public CascadeEntityLoader(IOuterJoinLoadable persister, CascadingAction action, log.Debug("Static select for action {0} on entity {1}: {2}", action, entityName, SqlString); } + + protected override bool InternStringMetadata => true; } } diff --git a/src/NHibernate/Loader/Entity/EntityLoader.cs b/src/NHibernate/Loader/Entity/EntityLoader.cs index af222d4e894..80bafc6d653 100644 --- a/src/NHibernate/Loader/Entity/EntityLoader.cs +++ b/src/NHibernate/Loader/Entity/EntityLoader.cs @@ -48,5 +48,7 @@ protected override bool IsSingleRowLoader { get { return !batchLoader; } } + + protected override bool InternStringMetadata => true; } } diff --git a/src/NHibernate/Mapping/Collection.cs b/src/NHibernate/Mapping/Collection.cs index 49677325626..34e325345b7 100644 --- a/src/NHibernate/Mapping/Collection.cs +++ b/src/NHibernate/Mapping/Collection.cs @@ -176,7 +176,7 @@ public bool IsLazy public string Role { get { return role; } - set { role = StringHelper.InternedIfPossible(value); } + set { role = StringHelper.Intern(value, InternLevel.CollectionRole); } } public IEnumerable ColumnIterator diff --git a/src/NHibernate/Mapping/Column.cs b/src/NHibernate/Mapping/Column.cs index d807125c547..cc5f65f6ed1 100644 --- a/src/NHibernate/Mapping/Column.cs +++ b/src/NHibernate/Mapping/Column.cs @@ -1,4 +1,5 @@ using System; +using System.Text; using NHibernate.Dialect.Function; using NHibernate.Engine; using NHibernate.SqlTypes; @@ -13,6 +14,8 @@ namespace NHibernate.Mapping [Serializable] public class Column : ISelectable, ICloneable { + private const char QuoteChar = '`'; + public const int DefaultLength = 255; public const int DefaultPrecision = 19; public const int DefaultScale = 2; @@ -82,18 +85,21 @@ public string Name get { return _name; } set { - if (value[0] == '`') - { - _quoted = true; - _name = value.Substring(1, value.Length - 2); - } - else - { - _name = value; - } + _name = StringHelper.Intern(GetName(value, out _quoted), InternLevel.ColumnName); } } + private string GetName(string value, out bool quoted) + { + quoted = false; + if (value[0] == QuoteChar) + { + quoted = true; + return value.Substring(1, value.Length - 2); + } + return value; + } + public string CanonicalName { get { return _quoted ? _name : _name.ToLowerInvariant(); } @@ -154,8 +160,9 @@ private string GetAlias(int maxAliasLength) // those checks, then the double checks for total length can be reduced to one. // But I will leave it like this for now to make it look similar. /Oskar 2016-08-20 bool useRawName = name.Length + suffix.Length <= usableLength && - !_quoted && - !StringHelper.EqualsCaseInsensitive(name, "rowid"); + !_quoted && + !string.Equals(name, "rowid", StringComparison.OrdinalIgnoreCase); + if (!useRawName) { if (suffix.Length >= usableLength) @@ -428,7 +435,7 @@ public SqlType GetSqlTypeCode(IMapping mapping) } catch (Exception e) { - throw new MappingException(string.Format("Could not determine type for column {0} of type {1}: {2}", + throw new MappingException(string.Format("Could not determine type for column {0} of type {1}: {2}", _name, type.GetType().FullName, e.GetType().FullName), e); } } @@ -436,7 +443,7 @@ public SqlType GetSqlTypeCode(IMapping mapping) /// returns quoted name as it would be in the mapping file. public string GetQuotedName() { - return _quoted ? '`' + _name + '`' : _name; + return _quoted ? QuoteChar + _name + QuoteChar : _name; } public bool IsCaracteristicsDefined() @@ -463,24 +470,24 @@ public bool IsLengthDefined() /// Shallow copy, the value is not copied public object Clone() { - Column copy = new Column(); - if (_length.HasValue) - copy.Length = Length; - if (_precision.HasValue) - copy.Precision = Precision; - if (_scale.HasValue) - copy.Scale = Scale; - copy.Value = _value; - copy.TypeIndex = _typeIndex; - copy.Name = GetQuotedName(); - copy.IsNullable = _nullable; - copy.Unique = _unique; - copy.SqlType = _sqlType; - copy.SqlTypeCode = _sqlTypeCode; - copy.UniqueInteger = UniqueInteger; //usually useless - copy.CheckConstraint = _checkConstraint; - copy.Comment = _comment; - copy.DefaultValue = _defaultValue; + Column copy = new Column() + { + _length = _length, + _name = _name, + _quoted = _quoted, + _checkConstraint = _checkConstraint, + _comment = _comment, + _defaultValue = _defaultValue, + _nullable = _nullable, + _unique = _unique, + _precision = _precision, + _scale = _scale, + _sqlType = _sqlType, + _sqlTypeCode = _sqlTypeCode, + _typeIndex = _typeIndex, + _value = _value, + UniqueInteger = UniqueInteger, + }; return copy; } diff --git a/src/NHibernate/Mapping/OneToMany.cs b/src/NHibernate/Mapping/OneToMany.cs index 119398bec67..f2e1746c78a 100644 --- a/src/NHibernate/Mapping/OneToMany.cs +++ b/src/NHibernate/Mapping/OneToMany.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NHibernate.Engine; using NHibernate.Type; +using NHibernate.Util; namespace NHibernate.Mapping { @@ -47,7 +48,7 @@ public int ColumnSpan public string ReferencedEntityName { get { return referencedEntityName; } - set { referencedEntityName = value == null ? null : string.Intern(value); } + set { referencedEntityName = StringHelper.Intern(value, InternLevel.ReferencedEntityName); } } public Table ReferencingTable @@ -154,4 +155,4 @@ public bool[] ColumnUpdateability get { throw new InvalidOperationException(); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate/Mapping/PersistentClass.cs b/src/NHibernate/Mapping/PersistentClass.cs index 202bf463055..8129c8405e2 100644 --- a/src/NHibernate/Mapping/PersistentClass.cs +++ b/src/NHibernate/Mapping/PersistentClass.cs @@ -70,7 +70,7 @@ public string ClassName get { return className; } set { - className = value == null ? null : string.Intern(value); + className = StringHelper.Intern(value, InternLevel.ClassName); mappedClass = null; } } @@ -259,7 +259,7 @@ public virtual IEnumerable DirectSubclasses public virtual string EntityName { get { return entityName; } - set { entityName = value == null ? null : String.Intern(value); } + set { entityName = StringHelper.Intern(value, InternLevel.EntityName, checkPoolIfInternIsDisabled: true); } } /// @@ -519,7 +519,7 @@ public virtual IDictionary FilterMap public string LoaderName { get { return loaderName; } - set { loaderName = value == null ? null : string.Intern(value); } + set { loaderName = value == null ? null : StringHelper.Intern(value, InternLevel.LoaderName); } } public virtual ISet SynchronizedTables diff --git a/src/NHibernate/Mapping/Property.cs b/src/NHibernate/Mapping/Property.cs index 49d29cac0a4..c504ba40add 100644 --- a/src/NHibernate/Mapping/Property.cs +++ b/src/NHibernate/Mapping/Property.cs @@ -66,7 +66,7 @@ public IEnumerable ColumnIterator public string Name { get { return name; } - set { name = value; } + set { name = StringHelper.Intern(value, InternLevel.PropertyName); } } public bool IsComposite diff --git a/src/NHibernate/Proxy/DynamicProxy/ProxyFactory.cs b/src/NHibernate/Proxy/DynamicProxy/ProxyFactory.cs index 1865190f182..0b43a28921e 100644 --- a/src/NHibernate/Proxy/DynamicProxy/ProxyFactory.cs +++ b/src/NHibernate/Proxy/DynamicProxy/ProxyFactory.cs @@ -76,9 +76,10 @@ public System.Type CreateProxyType(System.Type baseType, params System.Type[] in private TypeInfo CreateUncachedProxyType(System.Type baseType, IReadOnlyCollection baseInterfaces) { AppDomain currentDomain = AppDomain.CurrentDomain; - string typeName = string.Format("{0}Proxy", baseType.Name); - string assemblyName = string.Format("{0}Assembly", typeName); - string moduleName = string.Format("{0}Module", typeName); + const InternLevel internLevel = InternLevel.ProxyType; + string typeName = StringHelper.Intern($"{baseType.Name}Proxy", internLevel); + string assemblyName = StringHelper.Intern($"{typeName}Assembly", internLevel); + string moduleName = StringHelper.Intern($"{typeName}Module", internLevel); var name = new AssemblyName(assemblyName); AssemblyBuilder assemblyBuilder = ProxyAssemblyBuilder.DefineDynamicAssembly(currentDomain, name); diff --git a/src/NHibernate/Proxy/NHibernateProxyBuilder.cs b/src/NHibernate/Proxy/NHibernateProxyBuilder.cs index 8502d950b33..b2a76d0920a 100644 --- a/src/NHibernate/Proxy/NHibernateProxyBuilder.cs +++ b/src/NHibernate/Proxy/NHibernateProxyBuilder.cs @@ -45,9 +45,10 @@ public NHibernateProxyBuilder(MethodInfo getIdentifierMethod, MethodInfo setIden public TypeInfo CreateProxyType(System.Type baseType, IReadOnlyCollection baseInterfaces) { - var typeName = $"{baseType.Name}Proxy"; - var assemblyName = $"{typeName}Assembly"; - var moduleName = $"{typeName}Module"; + var internLevel = InternLevel.ProxyType; + var typeName = StringHelper.Intern($"{baseType.Name}Proxy", internLevel); + var assemblyName = StringHelper.Intern($"{typeName}Assembly", internLevel); + var moduleName = StringHelper.Intern($"{typeName}Module", internLevel); var name = new AssemblyName(assemblyName); @@ -117,11 +118,11 @@ private void CreateProxiedMethod(TypeBuilder typeBuilder, MethodInfo method, Fie { ImplementSetIdentifier(typeBuilder, method, lazyInitializerField); } - else if (!_overridesEquals && method.Name == "Equals" && method.GetBaseDefinition() == typeof(object).GetMethod("Equals", new[] {typeof(object)})) + else if (!_overridesEquals && method.Name == nameof(Equals) && method.GetBaseDefinition() == typeof(object).GetMethod(nameof(Equals), new[] {typeof(object)})) { //skip } - else if (!_overridesEquals && method.Name == "GetHashCode" && method.GetBaseDefinition() == typeof(object).GetMethod("GetHashCode")) + else if (!_overridesEquals && method.Name == nameof(GetHashCode) && method.GetBaseDefinition() == typeof(object).GetMethod(nameof(GetHashCode))) { //skip } diff --git a/src/NHibernate/SqlCommand/SqlSimpleSelectBuilder.cs b/src/NHibernate/SqlCommand/SqlSimpleSelectBuilder.cs index de7cbfc10a5..49b30a9bb02 100644 --- a/src/NHibernate/SqlCommand/SqlSimpleSelectBuilder.cs +++ b/src/NHibernate/SqlCommand/SqlSimpleSelectBuilder.cs @@ -180,6 +180,11 @@ public virtual SqlSimpleSelectBuilder SetComment(System.String comment) /// public SqlString ToSqlString() + { + return ToSqlString(false); + } + + public SqlString ToSqlString(bool intern) { //TODO: add default capacity SqlStringBuilder sqlBuilder = new SqlStringBuilder(); @@ -206,7 +211,7 @@ public SqlString ToSqlString() if (alias != null && !alias.Equals(column)) { sqlBuilder.Add(" AS ") - .Add(alias); + .Add(alias); } commaNeeded = true; @@ -214,7 +219,7 @@ public SqlString ToSqlString() sqlBuilder.Add(" FROM ") - .Add(Dialect.AppendLockHint(lockMode, tableName)); + .Add(Dialect.AppendLockHint(lockMode, tableName)); sqlBuilder.Add(" WHERE "); @@ -233,9 +238,9 @@ public SqlString ToSqlString() sqlBuilder.Add(Dialect.GetForUpdateString(lockMode)); } - return sqlBuilder.ToSqlString(); + return sqlBuilder.ToSqlString(intern); } #endregion - } -} \ No newline at end of file + } +} diff --git a/src/NHibernate/SqlCommand/SqlString.cs b/src/NHibernate/SqlCommand/SqlString.cs index 1e3de9453a5..8fcebd506e1 100644 --- a/src/NHibernate/SqlCommand/SqlString.cs +++ b/src/NHibernate/SqlCommand/SqlString.cs @@ -5,6 +5,7 @@ using System.Collections; using NHibernate.SqlCommand.Parser; using System.Text.RegularExpressions; +using NHibernate.Util; namespace NHibernate.SqlCommand { @@ -196,10 +197,10 @@ public SqlString(Parameter parameter) /// values. /// The instance is automatically compacted. public SqlString(params object[] parts) - : this((IEnumerable)parts) + : this((IEnumerable)parts, false) { } - - private SqlString(IEnumerable parts) + + public SqlString(IEnumerable parts, bool intern) { _parts = new List(); _parameters = new SortedList(); @@ -211,12 +212,27 @@ private SqlString(IEnumerable parts) Add(part, pendingContent, ref sqlIndex); } AppendAndResetPendingContent(pendingContent, ref sqlIndex); + if (intern) + { + for (var index = 0; index < _parts.Count; index++) + { + var part = _parts[index]; + if (part.IsParameter == false) + { + _parts[index] = new Part(part.SqlIndex, StringHelper.Intern(part.Content, InternLevel.SqlString)); + } + } + } _firstPartIndex = _parts.Count > 0 ? 0 : -1; _lastPartIndex = _parts.Count - 1; _length = sqlIndex; } + private SqlString(IEnumerable parts): this(parts, false) + { + } + #endregion #region Factory methods @@ -784,8 +800,9 @@ private void AppendAndResetPendingContent(StringBuilder pendingContent, ref int { if (pendingContent.Length > 0) { - _parts.Add(new Part(sqlIndex, pendingContent.ToString())); - sqlIndex += pendingContent.Length; + var value = pendingContent.ToString(); + _parts.Add(new Part(sqlIndex, value)); + sqlIndex += value.Length; pendingContent.Length = 0; } } diff --git a/src/NHibernate/SqlCommand/SqlStringBuilder.cs b/src/NHibernate/SqlCommand/SqlStringBuilder.cs index 6bcc4325aec..1660955c802 100644 --- a/src/NHibernate/SqlCommand/SqlStringBuilder.cs +++ b/src/NHibernate/SqlCommand/SqlStringBuilder.cs @@ -316,6 +316,11 @@ public SqlString ToSqlString() return new SqlString(sqlParts.ToArray()); } + public SqlString ToSqlString(bool intern) + { + return new SqlString(sqlParts, intern); + } + public override string ToString() { return ToSqlString().ToString(); diff --git a/src/NHibernate/Util/StringHelper.cs b/src/NHibernate/Util/StringHelper.cs index 169eeef6ebb..1fc6d55c45c 100644 --- a/src/NHibernate/Util/StringHelper.cs +++ b/src/NHibernate/Util/StringHelper.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Text; @@ -780,5 +781,95 @@ public static bool IsAnyNewLine(this string str, int index, out int newLineLengt newLineLength = 0; return false; } + + public static string[] Intern(string[] names, InternLevel internLevel, bool checkPoolIfInternIsDisabled = false) + { + if (names == null) + return null; + + for (var i = 0; i < names.Length; i++) + { + names[i] = Intern(names[i], internLevel, checkPoolIfInternIsDisabled); + } + return names; + } + + public static string Intern(string name, InternLevel internLevel, bool checkPoolIfInternIsDisabled = false) + { + if (name == null) + return null; + + if (name.Length == 0) + return string.Empty; + + if ((internLevel & Cfg.Environment.InternLevel) == internLevel) + { + //var isInterned = !string.IsNullOrEmpty(string.IsInterned(name)); + //Console.WriteLine($"Intern: {internLevel} {name} ({isInterned})"); + + return string.Intern(name); + } + + + return checkPoolIfInternIsDisabled + ? StringHelper.InternedIfPossible(name) + : name; + } + } + + [Flags] + public enum InternLevel + { + /// + /// No interning + /// + Disabled, + + EntityName = 1 << 0, + ReferencedEntityName = 1 << 1, + ClassName = 1 << 2, + + /// + /// Very close to old behavior (prior to NHibernate 5.1) + /// Makes sure that metadata with full type name (like EntityName, ReferencedEntityName) are interned. + /// + Minimal = EntityName | ReferencedEntityName | ClassName, + + ColumnName = 1 << 6, + PropertyName = 1 << 7, + + /// + /// More aggressive interning (additionally interns column names/ property names - strings that expected to be repeated in the single factory) + /// + Default = Minimal | ColumnName | PropertyName, + + /// + /// CAN'T BE USED with upstream code, as table aliases are unique per each session factory + /// + EntityAlias = 1 << 11, + CollectionRole = 1 << 12, + LoaderName = 1 << 13, + + /// + /// CAN'T BE USED with upstream code, as table aliases are unique per each session factory + /// + SqlString = 1 << 14, + + /// + /// Additionally interns metadata that's not repeated (or chance to repeat is considered low) inside single factory but can be shared across multiple factories. + /// Useful when multiple session factories with the same configuration needs to be created + /// + SessionFactories = Default | CollectionRole | LoaderName /*| EntityAlias | SqlString*/, + + //Suffix = 1<<20, + + ProxyType = 1<<21, + + /// + /// Additionally interns static string metadata (like type names for static dynamic proxy and so on...) + /// Useful in scenarios when Session Factories are created in multiple app domains + /// (for instance multiple web-sites/web-services running on the same App pool) + /// + AppDomains = SessionFactories | ProxyType, } }