diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/LICENSE.txt b/LICENSE.txt
index 2a0873f..d525254 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -20,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------------------------------------------------------
-Linq to SQL2 is (c) 2010-2014 Solutions Design bv. All rights reserved.
+Linq to SQL2 is (c) Solutions Design bv. All rights reserved.
http://www.sd.nl
COPYRIGHTS:
diff --git a/src/System.Data.Linq.resources b/src/Main.resources
similarity index 100%
rename from src/System.Data.Linq.resources
rename to src/Main.resources
diff --git a/src/System.Data.Linq.Mapping.resources b/src/Mapping.resources
similarity index 100%
rename from src/System.Data.Linq.Mapping.resources
rename to src/Mapping.resources
diff --git a/src/SD.Tools.LinqToSQL2.csproj b/src/SD.Tools.LinqToSQL2.csproj
index 04abd29..311b390 100644
--- a/src/SD.Tools.LinqToSQL2.csproj
+++ b/src/SD.Tools.LinqToSQL2.csproj
@@ -251,9 +251,9 @@
-
-
-
+
+
+
diff --git a/src/System.Data.Linq.SqlClient.resources b/src/SqlClient.resources
similarity index 100%
rename from src/System.Data.Linq.SqlClient.resources
rename to src/SqlClient.resources
diff --git a/tests/AdventureWorks2008Model/AdventureWorks2008.csproj b/tests/AdventureWorks2008Model/AdventureWorks2008.csproj
new file mode 100644
index 0000000..5866b1b
--- /dev/null
+++ b/tests/AdventureWorks2008Model/AdventureWorks2008.csproj
@@ -0,0 +1,306 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30703
+ 2.0
+ {26A446B2-7479-4DCB-A13B-C2A97F128A36}
+ Library
+ Properties
+ AdventureWorks2008
+ AdventureWorks2008
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ True
+ ..\ReadTestsAdventureWorks2008\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll
+
+
+ ..\..\src\bin\Debug\SD.Tools.LinqToSQL2.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
+
+
+ LLBLGen Pro
+
+
+ LLBLGen Pro
+
+
+ LLBLGen Pro
+
+
+ LLBLGen Pro
+
+
+ LLBLGen Pro
+
+
+ LLBLGen Pro
+
+
+ LLBLGen Pro
+
+
+
+
+ SqlServerTypes\x64\msvcr100.dll
+ PreserveNewest
+
+
+ SqlServerTypes\x64\SqlServerSpatial110.dll
+ PreserveNewest
+
+
+ SqlServerTypes\x86\msvcr100.dll
+ PreserveNewest
+
+
+ SqlServerTypes\x86\SqlServerSpatial110.dll
+ PreserveNewest
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/AdventureWorks2008DataContext.cs b/tests/AdventureWorks2008Model/AdventureWorks2008DataContext.cs
new file mode 100644
index 0000000..4c827d0
--- /dev/null
+++ b/tests/AdventureWorks2008Model/AdventureWorks2008DataContext.cs
@@ -0,0 +1,573 @@
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data;
+using System.Data.Common;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Configuration;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Reflection;
+using ReadTestsAdventureWorks2008.EntityClasses;
+using ReadTestsAdventureWorks2008.TypedViewClasses;
+
+namespace ReadTestsAdventureWorks2008
+{
+ /// Class which represents the DataContext for the project / group 'AdventureWorks2008'
+ /// Targets the catalog(s): 'AdventureWorks'
+ public partial class AdventureWorks2008DataContext : System.Data.Linq.DataContext
+ {
+ private static readonly System.Data.Linq.Mapping.MappingSource _mappingSource = new AttributeMappingSource();
+
+ #region Extensibility Method Definitions
+ partial void OnCreated();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public AdventureWorks2008DataContext() :
+ base(ConfigurationManager.ConnectionStrings["AdventureWorksConnectionString.SQL Server (SqlClient)"].ConnectionString, _mappingSource)
+ {
+ OnCreated();
+ }
+
+ /// Initializes a new instance of the class.
+ /// The mapping source.
+ public AdventureWorks2008DataContext(System.Data.Linq.Mapping.MappingSource mappingSource) :
+ base(ConfigurationManager.ConnectionStrings["AdventureWorksConnectionString.SQL Server (SqlClient)"].ConnectionString, mappingSource)
+ {
+ OnCreated();
+ }
+
+ /// Initializes a new instance of the class.
+ /// The connection.
+ public AdventureWorks2008DataContext(string connection) :
+ base(connection, _mappingSource)
+ {
+ OnCreated();
+ }
+
+ /// Initializes a new instance of the class.
+ /// The connection.
+ public AdventureWorks2008DataContext(System.Data.IDbConnection connection) :
+ base(connection, _mappingSource)
+ {
+ OnCreated();
+ }
+
+ /// Initializes a new instance of the class.
+ /// The connection.
+ /// The mapping source.
+ public AdventureWorks2008DataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
+ base(connection, mappingSource)
+ {
+ OnCreated();
+ }
+
+ /// Initializes a new instance of the class.
+ /// The connection.
+ /// The mapping source.
+ public AdventureWorks2008DataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
+ base(connection, mappingSource)
+ {
+ OnCreated();
+ }
+
+ /// Gets an open DbDataReader instance with the results of the query specified
+ /// The query to execute
+ /// An open DbDataReader instance with the results of the query specified
+ /// The command behavior is set to CloseConnection.
+ public DbDataReader GetQueryAsDataReader(IQueryable query)
+ {
+ return SetupCommand(GetCommand(query), true).ExecuteReader(CommandBehavior.CloseConnection);
+ }
+
+ /// Calls the stored procedure '[dbo].[uspGetBillOfMaterials]' and fills the typedview(s): 'BillOfRightsResult'
+ /// Parameter mapped onto the stored procedure parameter '@StartProductID'
+ /// Parameter mapped onto the stored procedure parameter '@CheckDate'
+ /// A single result object which contains the filled typedview 'BillOfRightsResult'
+ public ISingleResult GetBillOfRightsResult(System.Int32 StartProductID, System.DateTime CheckDate)
+ {
+ IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodBase.GetCurrentMethod())), StartProductID, CheckDate);
+ return (ISingleResult)(result.ReturnValue);
+ }
+
+ /// Gets the Address Table definition. Mapped on table 'AdventureWorks.Person.Address'.
+ public System.Data.Linq.Table Addresses
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the AddressType Table definition. Mapped on table 'AdventureWorks.Person.AddressType'.
+ public System.Data.Linq.Table AddressTypes
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the AwbuildVersion Table definition. Mapped on table 'AdventureWorks.dbo.AWBuildVersion'.
+ public System.Data.Linq.Table AwbuildVersions
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the BillOfMaterial Table definition. Mapped on table 'AdventureWorks.Production.BillOfMaterials'.
+ public System.Data.Linq.Table BillOfMaterials
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the BusinessEntity Table definition. Mapped on table 'AdventureWorks.Person.BusinessEntity'.
+ public System.Data.Linq.Table BusinessEntities
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the BusinessEntityAddress Table definition. Mapped on table 'AdventureWorks.Person.BusinessEntityAddress'.
+ public System.Data.Linq.Table BusinessEntityAddresses
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the BusinessEntityContact Table definition. Mapped on table 'AdventureWorks.Person.BusinessEntityContact'.
+ public System.Data.Linq.Table BusinessEntityContacts
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ContactType Table definition. Mapped on table 'AdventureWorks.Person.ContactType'.
+ public System.Data.Linq.Table ContactTypes
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the CountryRegion Table definition. Mapped on table 'AdventureWorks.Person.CountryRegion'.
+ public System.Data.Linq.Table CountryRegions
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the CountryRegionCurrency Table definition. Mapped on table 'AdventureWorks.Sales.CountryRegionCurrency'.
+ public System.Data.Linq.Table CountryRegionCurrencies
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the CreditCard Table definition. Mapped on table 'AdventureWorks.Sales.CreditCard'.
+ public System.Data.Linq.Table CreditCards
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Culture Table definition. Mapped on table 'AdventureWorks.Production.Culture'.
+ public System.Data.Linq.Table Cultures
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Currency Table definition. Mapped on table 'AdventureWorks.Sales.Currency'.
+ public System.Data.Linq.Table Currencies
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the CurrencyRate Table definition. Mapped on table 'AdventureWorks.Sales.CurrencyRate'.
+ public System.Data.Linq.Table CurrencyRates
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Customer Table definition. Mapped on table 'AdventureWorks.Sales.Customer'.
+ public System.Data.Linq.Table Customers
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the DatabaseLog Table definition. Mapped on table 'AdventureWorks.dbo.DatabaseLog'.
+ public System.Data.Linq.Table DatabaseLogs
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Department Table definition. Mapped on table 'AdventureWorks.HumanResources.Department'.
+ public System.Data.Linq.Table Departments
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Document Table definition. Mapped on table 'AdventureWorks.Production.Document'.
+ public System.Data.Linq.Table Documents
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the EmailAddress Table definition. Mapped on table 'AdventureWorks.Person.EmailAddress'.
+ public System.Data.Linq.Table EmailAddresses
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Employee Table definition. Mapped on table 'AdventureWorks.HumanResources.Employee'.
+ public System.Data.Linq.Table Employees
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the EmployeeDepartmentHistory Table definition. Mapped on table 'AdventureWorks.HumanResources.EmployeeDepartmentHistory'.
+ public System.Data.Linq.Table EmployeeDepartmentHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the EmployeePayHistory Table definition. Mapped on table 'AdventureWorks.HumanResources.EmployeePayHistory'.
+ public System.Data.Linq.Table EmployeePayHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ErrorLog Table definition. Mapped on table 'AdventureWorks.dbo.ErrorLog'.
+ public System.Data.Linq.Table ErrorLogs
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Illustration Table definition. Mapped on table 'AdventureWorks.Production.Illustration'.
+ public System.Data.Linq.Table Illustrations
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the JobCandidate Table definition. Mapped on table 'AdventureWorks.HumanResources.JobCandidate'.
+ public System.Data.Linq.Table JobCandidates
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Location Table definition. Mapped on table 'AdventureWorks.Production.Location'.
+ public System.Data.Linq.Table Locations
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Password Table definition. Mapped on table 'AdventureWorks.Person.Password'.
+ public System.Data.Linq.Table Passwords
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Person Table definition. Mapped on table 'AdventureWorks.Person.Person'.
+ public System.Data.Linq.Table People
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the PersonCreditCard Table definition. Mapped on table 'AdventureWorks.Sales.PersonCreditCard'.
+ public System.Data.Linq.Table PersonCreditCards
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the PersonPhone Table definition. Mapped on table 'AdventureWorks.Person.PersonPhone'.
+ public System.Data.Linq.Table PersonPhones
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the PhoneNumberType Table definition. Mapped on table 'AdventureWorks.Person.PhoneNumberType'.
+ public System.Data.Linq.Table PhoneNumberTypes
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Product Table definition. Mapped on table 'AdventureWorks.Production.Product'.
+ public System.Data.Linq.Table Products
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductCategory Table definition. Mapped on table 'AdventureWorks.Production.ProductCategory'.
+ public System.Data.Linq.Table ProductCategories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductCostHistory Table definition. Mapped on table 'AdventureWorks.Production.ProductCostHistory'.
+ public System.Data.Linq.Table ProductCostHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductDescription Table definition. Mapped on table 'AdventureWorks.Production.ProductDescription'.
+ public System.Data.Linq.Table ProductDescriptions
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductDocument Table definition. Mapped on table 'AdventureWorks.Production.ProductDocument'.
+ public System.Data.Linq.Table ProductDocuments
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductInventory Table definition. Mapped on table 'AdventureWorks.Production.ProductInventory'.
+ public System.Data.Linq.Table ProductInventories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductListPriceHistory Table definition. Mapped on table 'AdventureWorks.Production.ProductListPriceHistory'.
+ public System.Data.Linq.Table ProductListPriceHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductModel Table definition. Mapped on table 'AdventureWorks.Production.ProductModel'.
+ public System.Data.Linq.Table ProductModels
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductModelIllustration Table definition. Mapped on table 'AdventureWorks.Production.ProductModelIllustration'.
+ public System.Data.Linq.Table ProductModelIllustrations
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductModelProductDescriptionCulture Table definition. Mapped on table 'AdventureWorks.Production.ProductModelProductDescriptionCulture'.
+ public System.Data.Linq.Table ProductModelProductDescriptionCultures
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductPhoto Table definition. Mapped on table 'AdventureWorks.Production.ProductPhoto'.
+ public System.Data.Linq.Table ProductPhotos
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductProductPhoto Table definition. Mapped on table 'AdventureWorks.Production.ProductProductPhoto'.
+ public System.Data.Linq.Table ProductProductPhotos
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductReview Table definition. Mapped on table 'AdventureWorks.Production.ProductReview'.
+ public System.Data.Linq.Table ProductReviews
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductSubcategory Table definition. Mapped on table 'AdventureWorks.Production.ProductSubcategory'.
+ public System.Data.Linq.Table ProductSubcategories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ProductVendor Table definition. Mapped on table 'AdventureWorks.Purchasing.ProductVendor'.
+ public System.Data.Linq.Table ProductVendors
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the PurchaseOrderDetail Table definition. Mapped on table 'AdventureWorks.Purchasing.PurchaseOrderDetail'.
+ public System.Data.Linq.Table PurchaseOrderDetails
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the PurchaseOrderHeader Table definition. Mapped on table 'AdventureWorks.Purchasing.PurchaseOrderHeader'.
+ public System.Data.Linq.Table PurchaseOrderHeaders
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesOrderDetail Table definition. Mapped on table 'AdventureWorks.Sales.SalesOrderDetail'.
+ public System.Data.Linq.Table SalesOrderDetails
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesOrderHeader Table definition. Mapped on table 'AdventureWorks.Sales.SalesOrderHeader'.
+ public System.Data.Linq.Table SalesOrderHeaders
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesOrderHeaderSalesReason Table definition. Mapped on table 'AdventureWorks.Sales.SalesOrderHeaderSalesReason'.
+ public System.Data.Linq.Table SalesOrderHeaderSalesReasons
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesPerson Table definition. Mapped on table 'AdventureWorks.Sales.SalesPerson'.
+ public System.Data.Linq.Table SalesPeople
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesPersonQuotaHistory Table definition. Mapped on table 'AdventureWorks.Sales.SalesPersonQuotaHistory'.
+ public System.Data.Linq.Table SalesPersonQuotaHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesReason Table definition. Mapped on table 'AdventureWorks.Sales.SalesReason'.
+ public System.Data.Linq.Table SalesReasons
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesTaxRate Table definition. Mapped on table 'AdventureWorks.Sales.SalesTaxRate'.
+ public System.Data.Linq.Table SalesTaxRates
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesTerritory Table definition. Mapped on table 'AdventureWorks.Sales.SalesTerritory'.
+ public System.Data.Linq.Table SalesTerritories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SalesTerritoryHistory Table definition. Mapped on table 'AdventureWorks.Sales.SalesTerritoryHistory'.
+ public System.Data.Linq.Table SalesTerritoryHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ScrapReason Table definition. Mapped on table 'AdventureWorks.Production.ScrapReason'.
+ public System.Data.Linq.Table ScrapReasons
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Shift Table definition. Mapped on table 'AdventureWorks.HumanResources.Shift'.
+ public System.Data.Linq.Table Shifts
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ShipMethod Table definition. Mapped on table 'AdventureWorks.Purchasing.ShipMethod'.
+ public System.Data.Linq.Table ShipMethods
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the ShoppingCartItem Table definition. Mapped on table 'AdventureWorks.Sales.ShoppingCartItem'.
+ public System.Data.Linq.Table ShoppingCartItems
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SpecialOffer Table definition. Mapped on table 'AdventureWorks.Sales.SpecialOffer'.
+ public System.Data.Linq.Table SpecialOffers
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the SpecialOfferProduct Table definition. Mapped on table 'AdventureWorks.Sales.SpecialOfferProduct'.
+ public System.Data.Linq.Table SpecialOfferProducts
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the StateProvince Table definition. Mapped on table 'AdventureWorks.Person.StateProvince'.
+ public System.Data.Linq.Table StateProvinces
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Store Table definition. Mapped on table 'AdventureWorks.Sales.Store'.
+ public System.Data.Linq.Table Stores
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the TransactionHistory Table definition. Mapped on table 'AdventureWorks.Production.TransactionHistory'.
+ public System.Data.Linq.Table TransactionHistories
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the TransactionHistoryArchive Table definition. Mapped on table 'AdventureWorks.Production.TransactionHistoryArchive'.
+ public System.Data.Linq.Table TransactionHistoryArchives
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the UnitMeasure Table definition. Mapped on table 'AdventureWorks.Production.UnitMeasure'.
+ public System.Data.Linq.Table UnitMeasures
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the Vendor Table definition. Mapped on table 'AdventureWorks.Purchasing.Vendor'.
+ public System.Data.Linq.Table Vendors
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the WorkOrder Table definition. Mapped on table 'AdventureWorks.Production.WorkOrder'.
+ public System.Data.Linq.Table WorkOrders
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Gets the WorkOrderRouting Table definition. Mapped on table 'AdventureWorks.Production.WorkOrderRouting'.
+ public System.Data.Linq.Table WorkOrderRoutings
+ {
+ get { return this.GetTable(); }
+ }
+
+ /// Calls the Table-valued-function '[dbo].[ufnGetContactInformation]' and returns instances of type 'UfnGetContactInformationResultTypedViewRow'
+ /// parameter of the TVF
+ public IQueryable UfnGetContactInformation(System.Int32 personId)
+ {
+ return this.CreateMethodCallQuery(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), personId);
+ }
+
+ /// Sets up the command specified. It wires it to the current connection and transaction, sets command timeout and if requested, it also opens the command
+ /// The command to setup
+ /// If set to true, the connection is also opened if it's not already open, otherwise it's left as-is
+ /// The passed in DbCommand
+ private DbCommand SetupCommand(DbCommand toSetup, bool openConnection)
+ {
+ if(toSetup==null)
+ {
+ return toSetup;
+ }
+ toSetup.Connection = this.Connection;
+ toSetup.Transaction = this.Transaction;
+ toSetup.CommandTimeout = this.CommandTimeout;
+ if((toSetup.Connection!=null) && openConnection && (toSetup.Connection.State!=ConnectionState.Open))
+ {
+ toSetup.Connection.Open();
+ }
+ return toSetup;
+ }
+
+ /// Creates a new stored procedure call command and sets it up to make it ready to use.
+ /// The stored procedure to call.
+ /// ready to use command
+ private DbCommand CreateStoredProcCallCommand(string storedProcedureToCall)
+ {
+ var cmd = this.Connection.CreateCommand();
+ cmd.CommandType = CommandType.StoredProcedure;
+ cmd.CommandText = storedProcedureToCall;
+ return SetupCommand(cmd, false);
+ }
+
+ /// Adds a new parameter created from the input specified to the command specified
+ /// The command to add the new parameter to
+ /// Name of the parameter.
+ /// The type.
+ /// The length.
+ /// The direction.
+ /// The value for the parameter
+ private static void AddParameter(DbCommand cmd, string parameterName, SqlDbType type, int length, ParameterDirection direction, object value)
+ {
+ cmd.Parameters.Add(new SqlParameter(parameterName, type, length) { Direction = direction, Value = value });
+ }
+
+ }
+}
diff --git a/tests/AdventureWorks2008Model/AdventureWorks2008Mappings.xml b/tests/AdventureWorks2008Model/AdventureWorks2008Mappings.xml
new file mode 100644
index 0000000..32ec9ce
--- /dev/null
+++ b/tests/AdventureWorks2008Model/AdventureWorks2008Mappings.xml
@@ -0,0 +1,976 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/AdventureWorks2008Model/App.config b/tests/AdventureWorks2008Model/App.config
new file mode 100644
index 0000000..dfd7a56
--- /dev/null
+++ b/tests/AdventureWorks2008Model/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/tests/AdventureWorks2008Model/EntityClasses/Address.cs b/tests/AdventureWorks2008Model/EntityClasses/Address.cs
new file mode 100644
index 0000000..00dc08c
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/Address.cs
@@ -0,0 +1,353 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'Address', mapped on table 'AdventureWorks.Person.Address'.
+ public partial class Address : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _addressLine1;
+ private System.String _addressLine2;
+ private System.String _city;
+ private System.Int32 _id;
+ private System.DateTime _modifiedDate;
+ private System.String _postalCode;
+ private System.Guid _rowguid;
+ private Microsoft.SqlServer.Types.SqlGeography _spatialLocation;
+ private System.Int32 _stateProvinceId;
+ private EntitySet _businessEntityAddresses;
+ private EntitySet _salesOrderHeaders;
+ private EntitySet _salesOrderHeaders1;
+ private EntityRef _stateProvince;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnAddressLine1Changing(System.String value);
+ partial void OnAddressLine1Changed();
+ partial void OnAddressLine2Changing(System.String value);
+ partial void OnAddressLine2Changed();
+ partial void OnCityChanging(System.String value);
+ partial void OnCityChanged();
+ partial void OnIdChanging(System.Int32 value);
+ partial void OnIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnPostalCodeChanging(System.String value);
+ partial void OnPostalCodeChanged();
+ partial void OnRowguidChanging(System.Guid value);
+ partial void OnRowguidChanged();
+ partial void OnSpatialLocationChanging(Microsoft.SqlServer.Types.SqlGeography value);
+ partial void OnSpatialLocationChanged();
+ partial void OnStateProvinceIdChanging(System.Int32 value);
+ partial void OnStateProvinceIdChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public Address()
+ {
+ _businessEntityAddresses = new EntitySet(new Action(this.Attach_BusinessEntityAddresses), new Action(this.Detach_BusinessEntityAddresses) );
+ _salesOrderHeaders = new EntitySet(new Action(this.Attach_SalesOrderHeaders), new Action(this.Detach_SalesOrderHeaders) );
+ _salesOrderHeaders1 = new EntitySet(new Action(this.Attach_SalesOrderHeaders1), new Action(this.Detach_SalesOrderHeaders1) );
+ _stateProvince = default(EntityRef);
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_BusinessEntityAddresses(BusinessEntityAddress entity)
+ {
+ this.SendPropertyChanging("BusinessEntityAddresses");
+ entity.Address = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_BusinessEntityAddresses(BusinessEntityAddress entity)
+ {
+ this.SendPropertyChanging("BusinessEntityAddresses");
+ entity.Address = null;
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_SalesOrderHeaders(SalesOrderHeader entity)
+ {
+ this.SendPropertyChanging("SalesOrderHeaders");
+ entity.Address = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_SalesOrderHeaders(SalesOrderHeader entity)
+ {
+ this.SendPropertyChanging("SalesOrderHeaders");
+ entity.Address = null;
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_SalesOrderHeaders1(SalesOrderHeader entity)
+ {
+ this.SendPropertyChanging("SalesOrderHeaders1");
+ entity.Address1 = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_SalesOrderHeaders1(SalesOrderHeader entity)
+ {
+ this.SendPropertyChanging("SalesOrderHeaders1");
+ entity.Address1 = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the AddressLine1 field. Mapped on target field 'AddressLine1'.
+ public System.String AddressLine1
+ {
+ get { return _addressLine1; }
+ set
+ {
+ if((_addressLine1 != value))
+ {
+ OnAddressLine1Changing(value);
+ SendPropertyChanging("AddressLine1");
+ _addressLine1 = value;
+ SendPropertyChanged("AddressLine1");
+ OnAddressLine1Changed();
+ }
+ }
+ }
+
+ /// Gets or sets the AddressLine2 field. Mapped on target field 'AddressLine2'.
+ public System.String AddressLine2
+ {
+ get { return _addressLine2; }
+ set
+ {
+ if((_addressLine2 != value))
+ {
+ OnAddressLine2Changing(value);
+ SendPropertyChanging("AddressLine2");
+ _addressLine2 = value;
+ SendPropertyChanged("AddressLine2");
+ OnAddressLine2Changed();
+ }
+ }
+ }
+
+ /// Gets or sets the City field. Mapped on target field 'City'.
+ public System.String City
+ {
+ get { return _city; }
+ set
+ {
+ if((_city != value))
+ {
+ OnCityChanging(value);
+ SendPropertyChanging("City");
+ _city = value;
+ SendPropertyChanged("City");
+ OnCityChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Id field. Mapped on target field 'AddressID'.
+ public System.Int32 Id
+ {
+ get { return _id; }
+ set
+ {
+ if((_id != value))
+ {
+ OnIdChanging(value);
+ SendPropertyChanging("Id");
+ _id = value;
+ SendPropertyChanged("Id");
+ OnIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the PostalCode field. Mapped on target field 'PostalCode'.
+ public System.String PostalCode
+ {
+ get { return _postalCode; }
+ set
+ {
+ if((_postalCode != value))
+ {
+ OnPostalCodeChanging(value);
+ SendPropertyChanging("PostalCode");
+ _postalCode = value;
+ SendPropertyChanged("PostalCode");
+ OnPostalCodeChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Rowguid field. Mapped on target field 'rowguid'.
+ public System.Guid Rowguid
+ {
+ get { return _rowguid; }
+ set
+ {
+ if((_rowguid != value))
+ {
+ OnRowguidChanging(value);
+ SendPropertyChanging("Rowguid");
+ _rowguid = value;
+ SendPropertyChanged("Rowguid");
+ OnRowguidChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the SpatialLocation field. Mapped on target field 'SpatialLocation'.
+ public Microsoft.SqlServer.Types.SqlGeography SpatialLocation
+ {
+ get { return _spatialLocation; }
+ set
+ {
+ if((_spatialLocation != value))
+ {
+ OnSpatialLocationChanging(value);
+ SendPropertyChanging("SpatialLocation");
+ _spatialLocation = value;
+ SendPropertyChanged("SpatialLocation");
+ OnSpatialLocationChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the StateProvinceId field. Mapped on target field 'StateProvinceID'.
+ public System.Int32 StateProvinceId
+ {
+ get { return _stateProvinceId; }
+ set
+ {
+ if((_stateProvinceId != value))
+ {
+ if(_stateProvince.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnStateProvinceIdChanging(value);
+ SendPropertyChanging("StateProvinceId");
+ _stateProvinceId = value;
+ SendPropertyChanged("StateProvinceId");
+ OnStateProvinceIdChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.Address - Address.BusinessEntityAddresses (m:1)'
+ public EntitySet BusinessEntityAddresses
+ {
+ get { return this._businessEntityAddresses; }
+ set { this._businessEntityAddresses.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Address - Address.SalesOrderHeaders (m:1)'
+ public EntitySet SalesOrderHeaders
+ {
+ get { return this._salesOrderHeaders; }
+ set { this._salesOrderHeaders.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.Address1 - Address.SalesOrderHeaders1 (m:1)'
+ public EntitySet SalesOrderHeaders1
+ {
+ get { return this._salesOrderHeaders1; }
+ set { this._salesOrderHeaders1.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'Address.StateProvince - StateProvince.Addresses (m:1)'
+ public StateProvince StateProvince
+ {
+ get { return _stateProvince.Entity; }
+ set
+ {
+ StateProvince previousValue = _stateProvince.Entity;
+ if((previousValue != value) || (_stateProvince.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("StateProvince");
+ if(previousValue != null)
+ {
+ _stateProvince.Entity = null;
+ previousValue.Addresses.Remove(this);
+ }
+ _stateProvince.Entity = value;
+ if(value == null)
+ {
+ _stateProvinceId = default(System.Int32);
+ }
+ else
+ {
+ value.Addresses.Add(this);
+ _stateProvinceId = value.StateProvinceId;
+ }
+ this.SendPropertyChanged("StateProvince");
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/AddressType.cs b/tests/AdventureWorks2008Model/EntityClasses/AddressType.cs
new file mode 100644
index 0000000..9649f8f
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/AddressType.cs
@@ -0,0 +1,167 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'AddressType', mapped on table 'AdventureWorks.Person.AddressType'.
+ public partial class AddressType : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.Int32 _id;
+ private System.DateTime _modifiedDate;
+ private System.String _name;
+ private System.Guid _rowguid;
+ private EntitySet _businessEntityAddresses;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnIdChanging(System.Int32 value);
+ partial void OnIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnNameChanging(System.String value);
+ partial void OnNameChanged();
+ partial void OnRowguidChanging(System.Guid value);
+ partial void OnRowguidChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public AddressType()
+ {
+ _businessEntityAddresses = new EntitySet(new Action(this.Attach_BusinessEntityAddresses), new Action(this.Detach_BusinessEntityAddresses) );
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_BusinessEntityAddresses(BusinessEntityAddress entity)
+ {
+ this.SendPropertyChanging("BusinessEntityAddresses");
+ entity.AddressType = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_BusinessEntityAddresses(BusinessEntityAddress entity)
+ {
+ this.SendPropertyChanging("BusinessEntityAddresses");
+ entity.AddressType = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the Id field. Mapped on target field 'AddressTypeID'.
+ public System.Int32 Id
+ {
+ get { return _id; }
+ set
+ {
+ if((_id != value))
+ {
+ OnIdChanging(value);
+ SendPropertyChanging("Id");
+ _id = value;
+ SendPropertyChanged("Id");
+ OnIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Name field. Mapped on target field 'Name'.
+ public System.String Name
+ {
+ get { return _name; }
+ set
+ {
+ if((_name != value))
+ {
+ OnNameChanging(value);
+ SendPropertyChanging("Name");
+ _name = value;
+ SendPropertyChanged("Name");
+ OnNameChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Rowguid field. Mapped on target field 'rowguid'.
+ public System.Guid Rowguid
+ {
+ get { return _rowguid; }
+ set
+ {
+ if((_rowguid != value))
+ {
+ OnRowguidChanging(value);
+ SendPropertyChanging("Rowguid");
+ _rowguid = value;
+ SendPropertyChanged("Rowguid");
+ OnRowguidChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.AddressType - AddressType.BusinessEntityAddresses (m:1)'
+ public EntitySet BusinessEntityAddresses
+ {
+ get { return this._businessEntityAddresses; }
+ set { this._businessEntityAddresses.Assign(value); }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/AwbuildVersion.cs b/tests/AdventureWorks2008Model/EntityClasses/AwbuildVersion.cs
new file mode 100644
index 0000000..a470f52
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/AwbuildVersion.cs
@@ -0,0 +1,142 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'AwbuildVersion', mapped on table 'AdventureWorks.dbo.AWBuildVersion'.
+ public partial class AwbuildVersion : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _databaseVersion;
+ private System.DateTime _modifiedDate;
+ private System.Byte _systemInformationId;
+ private System.DateTime _versionDate;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnDatabaseVersionChanging(System.String value);
+ partial void OnDatabaseVersionChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnSystemInformationIdChanging(System.Byte value);
+ partial void OnSystemInformationIdChanged();
+ partial void OnVersionDateChanging(System.DateTime value);
+ partial void OnVersionDateChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public AwbuildVersion()
+ {
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the DatabaseVersion field. Mapped on target field 'Database Version'.
+ public System.String DatabaseVersion
+ {
+ get { return _databaseVersion; }
+ set
+ {
+ if((_databaseVersion != value))
+ {
+ OnDatabaseVersionChanging(value);
+ SendPropertyChanging("DatabaseVersion");
+ _databaseVersion = value;
+ SendPropertyChanged("DatabaseVersion");
+ OnDatabaseVersionChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the SystemInformationId field. Mapped on target field 'SystemInformationID'.
+ public System.Byte SystemInformationId
+ {
+ get { return _systemInformationId; }
+ set
+ {
+ if((_systemInformationId != value))
+ {
+ OnSystemInformationIdChanging(value);
+ SendPropertyChanging("SystemInformationId");
+ _systemInformationId = value;
+ SendPropertyChanged("SystemInformationId");
+ OnSystemInformationIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the VersionDate field. Mapped on target field 'VersionDate'.
+ public System.DateTime VersionDate
+ {
+ get { return _versionDate; }
+ set
+ {
+ if((_versionDate != value))
+ {
+ OnVersionDateChanging(value);
+ SendPropertyChanging("VersionDate");
+ _versionDate = value;
+ SendPropertyChanged("VersionDate");
+ OnVersionDateChanged();
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/BillOfMaterial.cs b/tests/AdventureWorks2008Model/EntityClasses/BillOfMaterial.cs
new file mode 100644
index 0000000..9503292
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/BillOfMaterial.cs
@@ -0,0 +1,350 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'BillOfMaterial', mapped on table 'AdventureWorks.Production.BillOfMaterials'.
+ public partial class BillOfMaterial : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.Int32 _billOfMaterialsId;
+ private System.Int16 _bomlevel;
+ private System.Int32 _componentId;
+ private Nullable _endDate;
+ private System.DateTime _modifiedDate;
+ private System.Decimal _perAssemblyQty;
+ private Nullable _productAssemblyId;
+ private System.DateTime _startDate;
+ private System.String _unitMeasureCode;
+ private EntityRef _product;
+ private EntityRef _product1;
+ private EntityRef _unitMeasure;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnBillOfMaterialsIdChanging(System.Int32 value);
+ partial void OnBillOfMaterialsIdChanged();
+ partial void OnBomlevelChanging(System.Int16 value);
+ partial void OnBomlevelChanged();
+ partial void OnComponentIdChanging(System.Int32 value);
+ partial void OnComponentIdChanged();
+ partial void OnEndDateChanging(Nullable value);
+ partial void OnEndDateChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnPerAssemblyQtyChanging(System.Decimal value);
+ partial void OnPerAssemblyQtyChanged();
+ partial void OnProductAssemblyIdChanging(Nullable value);
+ partial void OnProductAssemblyIdChanged();
+ partial void OnStartDateChanging(System.DateTime value);
+ partial void OnStartDateChanged();
+ partial void OnUnitMeasureCodeChanging(System.String value);
+ partial void OnUnitMeasureCodeChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public BillOfMaterial()
+ {
+ _product = default(EntityRef);
+ _product1 = default(EntityRef);
+ _unitMeasure = default(EntityRef);
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the BillOfMaterialsId field. Mapped on target field 'BillOfMaterialsID'.
+ public System.Int32 BillOfMaterialsId
+ {
+ get { return _billOfMaterialsId; }
+ set
+ {
+ if((_billOfMaterialsId != value))
+ {
+ OnBillOfMaterialsIdChanging(value);
+ SendPropertyChanging("BillOfMaterialsId");
+ _billOfMaterialsId = value;
+ SendPropertyChanged("BillOfMaterialsId");
+ OnBillOfMaterialsIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Bomlevel field. Mapped on target field 'BOMLevel'.
+ public System.Int16 Bomlevel
+ {
+ get { return _bomlevel; }
+ set
+ {
+ if((_bomlevel != value))
+ {
+ OnBomlevelChanging(value);
+ SendPropertyChanging("Bomlevel");
+ _bomlevel = value;
+ SendPropertyChanged("Bomlevel");
+ OnBomlevelChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ComponentId field. Mapped on target field 'ComponentID'.
+ public System.Int32 ComponentId
+ {
+ get { return _componentId; }
+ set
+ {
+ if((_componentId != value))
+ {
+ if(_product.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnComponentIdChanging(value);
+ SendPropertyChanging("ComponentId");
+ _componentId = value;
+ SendPropertyChanged("ComponentId");
+ OnComponentIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the EndDate field. Mapped on target field 'EndDate'.
+ public Nullable EndDate
+ {
+ get { return _endDate; }
+ set
+ {
+ if((_endDate != value))
+ {
+ OnEndDateChanging(value);
+ SendPropertyChanging("EndDate");
+ _endDate = value;
+ SendPropertyChanged("EndDate");
+ OnEndDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the PerAssemblyQty field. Mapped on target field 'PerAssemblyQty'.
+ public System.Decimal PerAssemblyQty
+ {
+ get { return _perAssemblyQty; }
+ set
+ {
+ if((_perAssemblyQty != value))
+ {
+ OnPerAssemblyQtyChanging(value);
+ SendPropertyChanging("PerAssemblyQty");
+ _perAssemblyQty = value;
+ SendPropertyChanged("PerAssemblyQty");
+ OnPerAssemblyQtyChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ProductAssemblyId field. Mapped on target field 'ProductAssemblyID'.
+ public Nullable ProductAssemblyId
+ {
+ get { return _productAssemblyId; }
+ set
+ {
+ if((_productAssemblyId != value))
+ {
+ if(_product1.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnProductAssemblyIdChanging(value);
+ SendPropertyChanging("ProductAssemblyId");
+ _productAssemblyId = value;
+ SendPropertyChanged("ProductAssemblyId");
+ OnProductAssemblyIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the StartDate field. Mapped on target field 'StartDate'.
+ public System.DateTime StartDate
+ {
+ get { return _startDate; }
+ set
+ {
+ if((_startDate != value))
+ {
+ OnStartDateChanging(value);
+ SendPropertyChanging("StartDate");
+ _startDate = value;
+ SendPropertyChanged("StartDate");
+ OnStartDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the UnitMeasureCode field. Mapped on target field 'UnitMeasureCode'.
+ public System.String UnitMeasureCode
+ {
+ get { return _unitMeasureCode; }
+ set
+ {
+ if((_unitMeasureCode != value))
+ {
+ if(_unitMeasure.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnUnitMeasureCodeChanging(value);
+ SendPropertyChanging("UnitMeasureCode");
+ _unitMeasureCode = value;
+ SendPropertyChanged("UnitMeasureCode");
+ OnUnitMeasureCodeChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BillOfMaterial.Product - Product.BillOfMaterials (m:1)'
+ public Product Product
+ {
+ get { return _product.Entity; }
+ set
+ {
+ Product previousValue = _product.Entity;
+ if((previousValue != value) || (_product.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Product");
+ if(previousValue != null)
+ {
+ _product.Entity = null;
+ previousValue.BillOfMaterials.Remove(this);
+ }
+ _product.Entity = value;
+ if(value == null)
+ {
+ _componentId = default(System.Int32);
+ }
+ else
+ {
+ value.BillOfMaterials.Add(this);
+ _componentId = value.ProductId;
+ }
+ this.SendPropertyChanged("Product");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BillOfMaterial.Product1 - Product.BillOfMaterials1 (m:1)'
+ public Product Product1
+ {
+ get { return _product1.Entity; }
+ set
+ {
+ Product previousValue = _product1.Entity;
+ if((previousValue != value) || (_product1.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Product1");
+ if(previousValue != null)
+ {
+ _product1.Entity = null;
+ previousValue.BillOfMaterials1.Remove(this);
+ }
+ _product1.Entity = value;
+ if(value == null)
+ {
+ _productAssemblyId = default(Nullable);
+ }
+ else
+ {
+ value.BillOfMaterials1.Add(this);
+ _productAssemblyId = value.ProductId;
+ }
+ this.SendPropertyChanged("Product1");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BillOfMaterial.UnitMeasure - UnitMeasure.BillOfMaterials (m:1)'
+ public UnitMeasure UnitMeasure
+ {
+ get { return _unitMeasure.Entity; }
+ set
+ {
+ UnitMeasure previousValue = _unitMeasure.Entity;
+ if((previousValue != value) || (_unitMeasure.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("UnitMeasure");
+ if(previousValue != null)
+ {
+ _unitMeasure.Entity = null;
+ previousValue.BillOfMaterials.Remove(this);
+ }
+ _unitMeasure.Entity = value;
+ if(value == null)
+ {
+ _unitMeasureCode = default(System.String);
+ }
+ else
+ {
+ value.BillOfMaterials.Add(this);
+ _unitMeasureCode = value.UnitMeasureCode;
+ }
+ this.SendPropertyChanged("UnitMeasure");
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/BusinessEntity.cs b/tests/AdventureWorks2008Model/EntityClasses/BusinessEntity.cs
new file mode 100644
index 0000000..531c9db
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/BusinessEntity.cs
@@ -0,0 +1,253 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'BusinessEntity', mapped on table 'AdventureWorks.Person.BusinessEntity'.
+ public partial class BusinessEntity : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.Int32 _businessEntityId;
+ private System.DateTime _modifiedDate;
+ private System.Guid _rowguid;
+ private EntitySet _businessEntityAddresses;
+ private EntitySet _businessEntityContacts;
+ private EntityRef _person;
+ private EntityRef _store;
+ private EntityRef _vendor;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnBusinessEntityIdChanging(System.Int32 value);
+ partial void OnBusinessEntityIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnRowguidChanging(System.Guid value);
+ partial void OnRowguidChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public BusinessEntity()
+ {
+ _businessEntityAddresses = new EntitySet(new Action(this.Attach_BusinessEntityAddresses), new Action(this.Detach_BusinessEntityAddresses) );
+ _businessEntityContacts = new EntitySet(new Action(this.Attach_BusinessEntityContacts), new Action(this.Detach_BusinessEntityContacts) );
+ _person = default(EntityRef);
+ _store = default(EntityRef);
+ _vendor = default(EntityRef);
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_BusinessEntityAddresses(BusinessEntityAddress entity)
+ {
+ this.SendPropertyChanging("BusinessEntityAddresses");
+ entity.BusinessEntity = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_BusinessEntityAddresses(BusinessEntityAddress entity)
+ {
+ this.SendPropertyChanging("BusinessEntityAddresses");
+ entity.BusinessEntity = null;
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_BusinessEntityContacts(BusinessEntityContact entity)
+ {
+ this.SendPropertyChanging("BusinessEntityContacts");
+ entity.BusinessEntity = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_BusinessEntityContacts(BusinessEntityContact entity)
+ {
+ this.SendPropertyChanging("BusinessEntityContacts");
+ entity.BusinessEntity = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the BusinessEntityId field. Mapped on target field 'BusinessEntityID'.
+ public System.Int32 BusinessEntityId
+ {
+ get { return _businessEntityId; }
+ set
+ {
+ if((_businessEntityId != value))
+ {
+ OnBusinessEntityIdChanging(value);
+ SendPropertyChanging("BusinessEntityId");
+ _businessEntityId = value;
+ SendPropertyChanged("BusinessEntityId");
+ OnBusinessEntityIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Rowguid field. Mapped on target field 'rowguid'.
+ public System.Guid Rowguid
+ {
+ get { return _rowguid; }
+ set
+ {
+ if((_rowguid != value))
+ {
+ OnRowguidChanging(value);
+ SendPropertyChanging("Rowguid");
+ _rowguid = value;
+ SendPropertyChanged("Rowguid");
+ OnRowguidChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.BusinessEntity - BusinessEntity.BusinessEntityAddresses (m:1)'
+ public EntitySet BusinessEntityAddresses
+ {
+ get { return this._businessEntityAddresses; }
+ set { this._businessEntityAddresses.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.BusinessEntity - BusinessEntity.BusinessEntityContacts (m:1)'
+ public EntitySet BusinessEntityContacts
+ {
+ get { return this._businessEntityContacts; }
+ set { this._businessEntityContacts.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'Person.BusinessEntity - BusinessEntity.Person (1:1)'
+ public Person Person
+ {
+ get { return _person.Entity; }
+ set
+ {
+ Person previousValue = _person.Entity;
+ if((previousValue != value) || (_person.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Person");
+ if(previousValue != null)
+ {
+ _person.Entity = null;
+ previousValue.BusinessEntity=null;
+ }
+ _person.Entity = value;
+ if(value != null)
+ {
+ value.BusinessEntity = this;
+ }
+ this.SendPropertyChanged("Person");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'Store.BusinessEntity - BusinessEntity.Store (1:1)'
+ public Store Store
+ {
+ get { return _store.Entity; }
+ set
+ {
+ Store previousValue = _store.Entity;
+ if((previousValue != value) || (_store.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Store");
+ if(previousValue != null)
+ {
+ _store.Entity = null;
+ previousValue.BusinessEntity=null;
+ }
+ _store.Entity = value;
+ if(value != null)
+ {
+ value.BusinessEntity = this;
+ }
+ this.SendPropertyChanged("Store");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'Vendor.BusinessEntity - BusinessEntity.Vendor (1:1)'
+ public Vendor Vendor
+ {
+ get { return _vendor.Entity; }
+ set
+ {
+ Vendor previousValue = _vendor.Entity;
+ if((previousValue != value) || (_vendor.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Vendor");
+ if(previousValue != null)
+ {
+ _vendor.Entity = null;
+ previousValue.BusinessEntity=null;
+ }
+ _vendor.Entity = value;
+ if(value != null)
+ {
+ value.BusinessEntity = this;
+ }
+ this.SendPropertyChanged("Vendor");
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/BusinessEntityAddress.cs b/tests/AdventureWorks2008Model/EntityClasses/BusinessEntityAddress.cs
new file mode 100644
index 0000000..7441084
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/BusinessEntityAddress.cs
@@ -0,0 +1,270 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'BusinessEntityAddress', mapped on table 'AdventureWorks.Person.BusinessEntityAddress'.
+ public partial class BusinessEntityAddress : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.Int32 _addressId;
+ private System.Int32 _addressTypeId;
+ private System.Int32 _businessEntityId;
+ private System.DateTime _modifiedDate;
+ private System.Guid _rowguid;
+ private EntityRef _address;
+ private EntityRef _addressType;
+ private EntityRef _businessEntity;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnAddressIdChanging(System.Int32 value);
+ partial void OnAddressIdChanged();
+ partial void OnAddressTypeIdChanging(System.Int32 value);
+ partial void OnAddressTypeIdChanged();
+ partial void OnBusinessEntityIdChanging(System.Int32 value);
+ partial void OnBusinessEntityIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnRowguidChanging(System.Guid value);
+ partial void OnRowguidChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public BusinessEntityAddress()
+ {
+ _address = default(EntityRef);
+ _addressType = default(EntityRef);
+ _businessEntity = default(EntityRef);
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the AddressId field. Mapped on target field 'AddressID'.
+ public System.Int32 AddressId
+ {
+ get { return _addressId; }
+ set
+ {
+ if((_addressId != value))
+ {
+ if(_address.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnAddressIdChanging(value);
+ SendPropertyChanging("AddressId");
+ _addressId = value;
+ SendPropertyChanged("AddressId");
+ OnAddressIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the AddressTypeId field. Mapped on target field 'AddressTypeID'.
+ public System.Int32 AddressTypeId
+ {
+ get { return _addressTypeId; }
+ set
+ {
+ if((_addressTypeId != value))
+ {
+ if(_addressType.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnAddressTypeIdChanging(value);
+ SendPropertyChanging("AddressTypeId");
+ _addressTypeId = value;
+ SendPropertyChanged("AddressTypeId");
+ OnAddressTypeIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the BusinessEntityId field. Mapped on target field 'BusinessEntityID'.
+ public System.Int32 BusinessEntityId
+ {
+ get { return _businessEntityId; }
+ set
+ {
+ if((_businessEntityId != value))
+ {
+ if(_businessEntity.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnBusinessEntityIdChanging(value);
+ SendPropertyChanging("BusinessEntityId");
+ _businessEntityId = value;
+ SendPropertyChanged("BusinessEntityId");
+ OnBusinessEntityIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Rowguid field. Mapped on target field 'rowguid'.
+ public System.Guid Rowguid
+ {
+ get { return _rowguid; }
+ set
+ {
+ if((_rowguid != value))
+ {
+ OnRowguidChanging(value);
+ SendPropertyChanging("Rowguid");
+ _rowguid = value;
+ SendPropertyChanged("Rowguid");
+ OnRowguidChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.Address - Address.BusinessEntityAddresses (m:1)'
+ public Address Address
+ {
+ get { return _address.Entity; }
+ set
+ {
+ Address previousValue = _address.Entity;
+ if((previousValue != value) || (_address.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Address");
+ if(previousValue != null)
+ {
+ _address.Entity = null;
+ previousValue.BusinessEntityAddresses.Remove(this);
+ }
+ _address.Entity = value;
+ if(value == null)
+ {
+ _addressId = default(System.Int32);
+ }
+ else
+ {
+ value.BusinessEntityAddresses.Add(this);
+ _addressId = value.Id;
+ }
+ this.SendPropertyChanged("Address");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.AddressType - AddressType.BusinessEntityAddresses (m:1)'
+ public AddressType AddressType
+ {
+ get { return _addressType.Entity; }
+ set
+ {
+ AddressType previousValue = _addressType.Entity;
+ if((previousValue != value) || (_addressType.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("AddressType");
+ if(previousValue != null)
+ {
+ _addressType.Entity = null;
+ previousValue.BusinessEntityAddresses.Remove(this);
+ }
+ _addressType.Entity = value;
+ if(value == null)
+ {
+ _addressTypeId = default(System.Int32);
+ }
+ else
+ {
+ value.BusinessEntityAddresses.Add(this);
+ _addressTypeId = value.Id;
+ }
+ this.SendPropertyChanged("AddressType");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityAddress.BusinessEntity - BusinessEntity.BusinessEntityAddresses (m:1)'
+ public BusinessEntity BusinessEntity
+ {
+ get { return _businessEntity.Entity; }
+ set
+ {
+ BusinessEntity previousValue = _businessEntity.Entity;
+ if((previousValue != value) || (_businessEntity.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("BusinessEntity");
+ if(previousValue != null)
+ {
+ _businessEntity.Entity = null;
+ previousValue.BusinessEntityAddresses.Remove(this);
+ }
+ _businessEntity.Entity = value;
+ if(value == null)
+ {
+ _businessEntityId = default(System.Int32);
+ }
+ else
+ {
+ value.BusinessEntityAddresses.Add(this);
+ _businessEntityId = value.BusinessEntityId;
+ }
+ this.SendPropertyChanged("BusinessEntity");
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/BusinessEntityContact.cs b/tests/AdventureWorks2008Model/EntityClasses/BusinessEntityContact.cs
new file mode 100644
index 0000000..11cdbe5
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/BusinessEntityContact.cs
@@ -0,0 +1,270 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'BusinessEntityContact', mapped on table 'AdventureWorks.Person.BusinessEntityContact'.
+ public partial class BusinessEntityContact : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.Int32 _businessEntityId;
+ private System.Int32 _contactTypeId;
+ private System.DateTime _modifiedDate;
+ private System.Int32 _personId;
+ private System.Guid _rowguid;
+ private EntityRef _businessEntity;
+ private EntityRef _contactType;
+ private EntityRef _person;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnBusinessEntityIdChanging(System.Int32 value);
+ partial void OnBusinessEntityIdChanged();
+ partial void OnContactTypeIdChanging(System.Int32 value);
+ partial void OnContactTypeIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnPersonIdChanging(System.Int32 value);
+ partial void OnPersonIdChanged();
+ partial void OnRowguidChanging(System.Guid value);
+ partial void OnRowguidChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public BusinessEntityContact()
+ {
+ _businessEntity = default(EntityRef);
+ _contactType = default(EntityRef);
+ _person = default(EntityRef);
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the BusinessEntityId field. Mapped on target field 'BusinessEntityID'.
+ public System.Int32 BusinessEntityId
+ {
+ get { return _businessEntityId; }
+ set
+ {
+ if((_businessEntityId != value))
+ {
+ if(_businessEntity.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnBusinessEntityIdChanging(value);
+ SendPropertyChanging("BusinessEntityId");
+ _businessEntityId = value;
+ SendPropertyChanged("BusinessEntityId");
+ OnBusinessEntityIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ContactTypeId field. Mapped on target field 'ContactTypeID'.
+ public System.Int32 ContactTypeId
+ {
+ get { return _contactTypeId; }
+ set
+ {
+ if((_contactTypeId != value))
+ {
+ if(_contactType.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnContactTypeIdChanging(value);
+ SendPropertyChanging("ContactTypeId");
+ _contactTypeId = value;
+ SendPropertyChanged("ContactTypeId");
+ OnContactTypeIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the PersonId field. Mapped on target field 'PersonID'.
+ public System.Int32 PersonId
+ {
+ get { return _personId; }
+ set
+ {
+ if((_personId != value))
+ {
+ if(_person.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnPersonIdChanging(value);
+ SendPropertyChanging("PersonId");
+ _personId = value;
+ SendPropertyChanged("PersonId");
+ OnPersonIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Rowguid field. Mapped on target field 'rowguid'.
+ public System.Guid Rowguid
+ {
+ get { return _rowguid; }
+ set
+ {
+ if((_rowguid != value))
+ {
+ OnRowguidChanging(value);
+ SendPropertyChanging("Rowguid");
+ _rowguid = value;
+ SendPropertyChanged("Rowguid");
+ OnRowguidChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.BusinessEntity - BusinessEntity.BusinessEntityContacts (m:1)'
+ public BusinessEntity BusinessEntity
+ {
+ get { return _businessEntity.Entity; }
+ set
+ {
+ BusinessEntity previousValue = _businessEntity.Entity;
+ if((previousValue != value) || (_businessEntity.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("BusinessEntity");
+ if(previousValue != null)
+ {
+ _businessEntity.Entity = null;
+ previousValue.BusinessEntityContacts.Remove(this);
+ }
+ _businessEntity.Entity = value;
+ if(value == null)
+ {
+ _businessEntityId = default(System.Int32);
+ }
+ else
+ {
+ value.BusinessEntityContacts.Add(this);
+ _businessEntityId = value.BusinessEntityId;
+ }
+ this.SendPropertyChanged("BusinessEntity");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.ContactType - ContactType.BusinessEntityContacts (m:1)'
+ public ContactType ContactType
+ {
+ get { return _contactType.Entity; }
+ set
+ {
+ ContactType previousValue = _contactType.Entity;
+ if((previousValue != value) || (_contactType.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("ContactType");
+ if(previousValue != null)
+ {
+ _contactType.Entity = null;
+ previousValue.BusinessEntityContacts.Remove(this);
+ }
+ _contactType.Entity = value;
+ if(value == null)
+ {
+ _contactTypeId = default(System.Int32);
+ }
+ else
+ {
+ value.BusinessEntityContacts.Add(this);
+ _contactTypeId = value.ContactTypeId;
+ }
+ this.SendPropertyChanged("ContactType");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.Person - Person.BusinessEntityContacts (m:1)'
+ public Person Person
+ {
+ get { return _person.Entity; }
+ set
+ {
+ Person previousValue = _person.Entity;
+ if((previousValue != value) || (_person.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Person");
+ if(previousValue != null)
+ {
+ _person.Entity = null;
+ previousValue.BusinessEntityContacts.Remove(this);
+ }
+ _person.Entity = value;
+ if(value == null)
+ {
+ _personId = default(System.Int32);
+ }
+ else
+ {
+ value.BusinessEntityContacts.Add(this);
+ _personId = value.BusinessEntityId;
+ }
+ this.SendPropertyChanged("Person");
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/ContactType.cs b/tests/AdventureWorks2008Model/EntityClasses/ContactType.cs
new file mode 100644
index 0000000..fc81c23
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/ContactType.cs
@@ -0,0 +1,147 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'ContactType', mapped on table 'AdventureWorks.Person.ContactType'.
+ public partial class ContactType : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.Int32 _contactTypeId;
+ private System.DateTime _modifiedDate;
+ private System.String _name;
+ private EntitySet _businessEntityContacts;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnContactTypeIdChanging(System.Int32 value);
+ partial void OnContactTypeIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnNameChanging(System.String value);
+ partial void OnNameChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public ContactType()
+ {
+ _businessEntityContacts = new EntitySet(new Action(this.Attach_BusinessEntityContacts), new Action(this.Detach_BusinessEntityContacts) );
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_BusinessEntityContacts(BusinessEntityContact entity)
+ {
+ this.SendPropertyChanging("BusinessEntityContacts");
+ entity.ContactType = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_BusinessEntityContacts(BusinessEntityContact entity)
+ {
+ this.SendPropertyChanging("BusinessEntityContacts");
+ entity.ContactType = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the ContactTypeId field. Mapped on target field 'ContactTypeID'.
+ public System.Int32 ContactTypeId
+ {
+ get { return _contactTypeId; }
+ set
+ {
+ if((_contactTypeId != value))
+ {
+ OnContactTypeIdChanging(value);
+ SendPropertyChanging("ContactTypeId");
+ _contactTypeId = value;
+ SendPropertyChanged("ContactTypeId");
+ OnContactTypeIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Name field. Mapped on target field 'Name'.
+ public System.String Name
+ {
+ get { return _name; }
+ set
+ {
+ if((_name != value))
+ {
+ OnNameChanging(value);
+ SendPropertyChanging("Name");
+ _name = value;
+ SendPropertyChanged("Name");
+ OnNameChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'BusinessEntityContact.ContactType - ContactType.BusinessEntityContacts (m:1)'
+ public EntitySet BusinessEntityContacts
+ {
+ get { return this._businessEntityContacts; }
+ set { this._businessEntityContacts.Assign(value); }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/CountryRegion.cs b/tests/AdventureWorks2008Model/EntityClasses/CountryRegion.cs
new file mode 100644
index 0000000..85d8abe
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/CountryRegion.cs
@@ -0,0 +1,197 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'CountryRegion', mapped on table 'AdventureWorks.Person.CountryRegion'.
+ public partial class CountryRegion : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _countryRegionCode;
+ private System.DateTime _modifiedDate;
+ private System.String _name;
+ private EntitySet _countryRegionCurrencies;
+ private EntitySet _salesTerritories;
+ private EntitySet _stateProvinces;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnCountryRegionCodeChanging(System.String value);
+ partial void OnCountryRegionCodeChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnNameChanging(System.String value);
+ partial void OnNameChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public CountryRegion()
+ {
+ _countryRegionCurrencies = new EntitySet(new Action(this.Attach_CountryRegionCurrencies), new Action(this.Detach_CountryRegionCurrencies) );
+ _salesTerritories = new EntitySet(new Action(this.Attach_SalesTerritories), new Action(this.Detach_SalesTerritories) );
+ _stateProvinces = new EntitySet(new Action(this.Attach_StateProvinces), new Action(this.Detach_StateProvinces) );
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_CountryRegionCurrencies(CountryRegionCurrency entity)
+ {
+ this.SendPropertyChanging("CountryRegionCurrencies");
+ entity.CountryRegion = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_CountryRegionCurrencies(CountryRegionCurrency entity)
+ {
+ this.SendPropertyChanging("CountryRegionCurrencies");
+ entity.CountryRegion = null;
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_SalesTerritories(SalesTerritory entity)
+ {
+ this.SendPropertyChanging("SalesTerritories");
+ entity.CountryRegion = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_SalesTerritories(SalesTerritory entity)
+ {
+ this.SendPropertyChanging("SalesTerritories");
+ entity.CountryRegion = null;
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_StateProvinces(StateProvince entity)
+ {
+ this.SendPropertyChanging("StateProvinces");
+ entity.CountryRegion = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_StateProvinces(StateProvince entity)
+ {
+ this.SendPropertyChanging("StateProvinces");
+ entity.CountryRegion = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the CountryRegionCode field. Mapped on target field 'CountryRegionCode'.
+ public System.String CountryRegionCode
+ {
+ get { return _countryRegionCode; }
+ set
+ {
+ if((_countryRegionCode != value))
+ {
+ OnCountryRegionCodeChanging(value);
+ SendPropertyChanging("CountryRegionCode");
+ _countryRegionCode = value;
+ SendPropertyChanged("CountryRegionCode");
+ OnCountryRegionCodeChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Name field. Mapped on target field 'Name'.
+ public System.String Name
+ {
+ get { return _name; }
+ set
+ {
+ if((_name != value))
+ {
+ OnNameChanging(value);
+ SendPropertyChanging("Name");
+ _name = value;
+ SendPropertyChanged("Name");
+ OnNameChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.CountryRegion - CountryRegion.CountryRegionCurrencies (m:1)'
+ public EntitySet CountryRegionCurrencies
+ {
+ get { return this._countryRegionCurrencies; }
+ set { this._countryRegionCurrencies.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'SalesTerritory.CountryRegion - CountryRegion.SalesTerritories (m:1)'
+ public EntitySet SalesTerritories
+ {
+ get { return this._salesTerritories; }
+ set { this._salesTerritories.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'StateProvince.CountryRegion - CountryRegion.StateProvinces (m:1)'
+ public EntitySet StateProvinces
+ {
+ get { return this._stateProvinces; }
+ set { this._stateProvinces.Assign(value); }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/CountryRegionCurrency.cs b/tests/AdventureWorks2008Model/EntityClasses/CountryRegionCurrency.cs
new file mode 100644
index 0000000..f474e66
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/CountryRegionCurrency.cs
@@ -0,0 +1,194 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'CountryRegionCurrency', mapped on table 'AdventureWorks.Sales.CountryRegionCurrency'.
+ public partial class CountryRegionCurrency : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _countryRegionCode;
+ private System.String _currencyCode;
+ private System.DateTime _modifiedDate;
+ private EntityRef _countryRegion;
+ private EntityRef _currency;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnCountryRegionCodeChanging(System.String value);
+ partial void OnCountryRegionCodeChanged();
+ partial void OnCurrencyCodeChanging(System.String value);
+ partial void OnCurrencyCodeChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public CountryRegionCurrency()
+ {
+ _countryRegion = default(EntityRef);
+ _currency = default(EntityRef);
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the CountryRegionCode field. Mapped on target field 'CountryRegionCode'.
+ public System.String CountryRegionCode
+ {
+ get { return _countryRegionCode; }
+ set
+ {
+ if((_countryRegionCode != value))
+ {
+ if(_countryRegion.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnCountryRegionCodeChanging(value);
+ SendPropertyChanging("CountryRegionCode");
+ _countryRegionCode = value;
+ SendPropertyChanged("CountryRegionCode");
+ OnCountryRegionCodeChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the CurrencyCode field. Mapped on target field 'CurrencyCode'.
+ public System.String CurrencyCode
+ {
+ get { return _currencyCode; }
+ set
+ {
+ if((_currencyCode != value))
+ {
+ if(_currency.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ OnCurrencyCodeChanging(value);
+ SendPropertyChanging("CurrencyCode");
+ _currencyCode = value;
+ SendPropertyChanged("CurrencyCode");
+ OnCurrencyCodeChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.CountryRegion - CountryRegion.CountryRegionCurrencies (m:1)'
+ public CountryRegion CountryRegion
+ {
+ get { return _countryRegion.Entity; }
+ set
+ {
+ CountryRegion previousValue = _countryRegion.Entity;
+ if((previousValue != value) || (_countryRegion.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("CountryRegion");
+ if(previousValue != null)
+ {
+ _countryRegion.Entity = null;
+ previousValue.CountryRegionCurrencies.Remove(this);
+ }
+ _countryRegion.Entity = value;
+ if(value == null)
+ {
+ _countryRegionCode = default(System.String);
+ }
+ else
+ {
+ value.CountryRegionCurrencies.Add(this);
+ _countryRegionCode = value.CountryRegionCode;
+ }
+ this.SendPropertyChanged("CountryRegion");
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'CountryRegionCurrency.Currency - Currency.CountryRegionCurrencies (m:1)'
+ public Currency Currency
+ {
+ get { return _currency.Entity; }
+ set
+ {
+ Currency previousValue = _currency.Entity;
+ if((previousValue != value) || (_currency.HasLoadedOrAssignedValue == false))
+ {
+ this.SendPropertyChanging("Currency");
+ if(previousValue != null)
+ {
+ _currency.Entity = null;
+ previousValue.CountryRegionCurrencies.Remove(this);
+ }
+ _currency.Entity = value;
+ if(value == null)
+ {
+ _currencyCode = default(System.String);
+ }
+ else
+ {
+ value.CountryRegionCurrencies.Add(this);
+ _currencyCode = value.CurrencyCode;
+ }
+ this.SendPropertyChanged("Currency");
+ }
+ }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/CreditCard.cs b/tests/AdventureWorks2008Model/EntityClasses/CreditCard.cs
new file mode 100644
index 0000000..3c4258a
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/CreditCard.cs
@@ -0,0 +1,232 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'CreditCard', mapped on table 'AdventureWorks.Sales.CreditCard'.
+ public partial class CreditCard : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _cardNumber;
+ private System.String _cardType;
+ private System.Int32 _creditCardId;
+ private System.Byte _expMonth;
+ private System.Int16 _expYear;
+ private System.DateTime _modifiedDate;
+ private EntitySet _personCreditCards;
+ private EntitySet _salesOrderHeaders;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnCardNumberChanging(System.String value);
+ partial void OnCardNumberChanged();
+ partial void OnCardTypeChanging(System.String value);
+ partial void OnCardTypeChanged();
+ partial void OnCreditCardIdChanging(System.Int32 value);
+ partial void OnCreditCardIdChanged();
+ partial void OnExpMonthChanging(System.Byte value);
+ partial void OnExpMonthChanged();
+ partial void OnExpYearChanging(System.Int16 value);
+ partial void OnExpYearChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public CreditCard()
+ {
+ _personCreditCards = new EntitySet(new Action(this.Attach_PersonCreditCards), new Action(this.Detach_PersonCreditCards) );
+ _salesOrderHeaders = new EntitySet(new Action(this.Attach_SalesOrderHeaders), new Action(this.Detach_SalesOrderHeaders) );
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_PersonCreditCards(PersonCreditCard entity)
+ {
+ this.SendPropertyChanging("PersonCreditCards");
+ entity.CreditCard = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_PersonCreditCards(PersonCreditCard entity)
+ {
+ this.SendPropertyChanging("PersonCreditCards");
+ entity.CreditCard = null;
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_SalesOrderHeaders(SalesOrderHeader entity)
+ {
+ this.SendPropertyChanging("SalesOrderHeaders");
+ entity.CreditCard = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_SalesOrderHeaders(SalesOrderHeader entity)
+ {
+ this.SendPropertyChanging("SalesOrderHeaders");
+ entity.CreditCard = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the CardNumber field. Mapped on target field 'CardNumber'.
+ public System.String CardNumber
+ {
+ get { return _cardNumber; }
+ set
+ {
+ if((_cardNumber != value))
+ {
+ OnCardNumberChanging(value);
+ SendPropertyChanging("CardNumber");
+ _cardNumber = value;
+ SendPropertyChanged("CardNumber");
+ OnCardNumberChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the CardType field. Mapped on target field 'CardType'.
+ public System.String CardType
+ {
+ get { return _cardType; }
+ set
+ {
+ if((_cardType != value))
+ {
+ OnCardTypeChanging(value);
+ SendPropertyChanging("CardType");
+ _cardType = value;
+ SendPropertyChanged("CardType");
+ OnCardTypeChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the CreditCardId field. Mapped on target field 'CreditCardID'.
+ public System.Int32 CreditCardId
+ {
+ get { return _creditCardId; }
+ set
+ {
+ if((_creditCardId != value))
+ {
+ OnCreditCardIdChanging(value);
+ SendPropertyChanging("CreditCardId");
+ _creditCardId = value;
+ SendPropertyChanged("CreditCardId");
+ OnCreditCardIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ExpMonth field. Mapped on target field 'ExpMonth'.
+ public System.Byte ExpMonth
+ {
+ get { return _expMonth; }
+ set
+ {
+ if((_expMonth != value))
+ {
+ OnExpMonthChanging(value);
+ SendPropertyChanging("ExpMonth");
+ _expMonth = value;
+ SendPropertyChanged("ExpMonth");
+ OnExpMonthChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ExpYear field. Mapped on target field 'ExpYear'.
+ public System.Int16 ExpYear
+ {
+ get { return _expYear; }
+ set
+ {
+ if((_expYear != value))
+ {
+ OnExpYearChanging(value);
+ SendPropertyChanging("ExpYear");
+ _expYear = value;
+ SendPropertyChanged("ExpYear");
+ OnExpYearChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'PersonCreditCard.CreditCard - CreditCard.PersonCreditCards (m:1)'
+ public EntitySet PersonCreditCards
+ {
+ get { return this._personCreditCards; }
+ set { this._personCreditCards.Assign(value); }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'SalesOrderHeader.CreditCard - CreditCard.SalesOrderHeaders (m:1)'
+ public EntitySet SalesOrderHeaders
+ {
+ get { return this._salesOrderHeaders; }
+ set { this._salesOrderHeaders.Assign(value); }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/Culture.cs b/tests/AdventureWorks2008Model/EntityClasses/Culture.cs
new file mode 100644
index 0000000..044681a
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/Culture.cs
@@ -0,0 +1,147 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'Culture', mapped on table 'AdventureWorks.Production.Culture'.
+ public partial class Culture : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _cultureId;
+ private System.DateTime _modifiedDate;
+ private System.String _name;
+ private EntitySet _productModelProductDescriptionCultures;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnCultureIdChanging(System.String value);
+ partial void OnCultureIdChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnNameChanging(System.String value);
+ partial void OnNameChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public Culture()
+ {
+ _productModelProductDescriptionCultures = new EntitySet(new Action(this.Attach_ProductModelProductDescriptionCultures), new Action(this.Detach_ProductModelProductDescriptionCultures) );
+ OnCreated();
+ }
+
+ /// Raises the PropertyChanging event
+ /// name of the property which is changing
+ protected virtual void SendPropertyChanging(string propertyName)
+ {
+ if((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
+ }
+ }
+
+ /// Raises the PropertyChanged event for the property specified
+ /// name of the property which was changed
+ protected virtual void SendPropertyChanged(string propertyName)
+ {
+ if((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ /// Attaches this instance to the entity specified as an associated entity
+ /// The related entity to attach to
+ private void Attach_ProductModelProductDescriptionCultures(ProductModelProductDescriptionCulture entity)
+ {
+ this.SendPropertyChanging("ProductModelProductDescriptionCultures");
+ entity.Culture = this;
+ }
+
+ /// Detaches this instance from the entity specified so it's no longer an associated entity
+ /// The related entity to detach from
+ private void Detach_ProductModelProductDescriptionCultures(ProductModelProductDescriptionCulture entity)
+ {
+ this.SendPropertyChanging("ProductModelProductDescriptionCultures");
+ entity.Culture = null;
+ }
+
+
+ #region Class Property Declarations
+ /// Gets or sets the CultureId field. Mapped on target field 'CultureID'.
+ public System.String CultureId
+ {
+ get { return _cultureId; }
+ set
+ {
+ if((_cultureId != value))
+ {
+ OnCultureIdChanging(value);
+ SendPropertyChanging("CultureId");
+ _cultureId = value;
+ SendPropertyChanged("CultureId");
+ OnCultureIdChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'.
+ public System.DateTime ModifiedDate
+ {
+ get { return _modifiedDate; }
+ set
+ {
+ if((_modifiedDate != value))
+ {
+ OnModifiedDateChanging(value);
+ SendPropertyChanging("ModifiedDate");
+ _modifiedDate = value;
+ SendPropertyChanged("ModifiedDate");
+ OnModifiedDateChanged();
+ }
+ }
+ }
+
+ /// Gets or sets the Name field. Mapped on target field 'Name'.
+ public System.String Name
+ {
+ get { return _name; }
+ set
+ {
+ if((_name != value))
+ {
+ OnNameChanging(value);
+ SendPropertyChanging("Name");
+ _name = value;
+ SendPropertyChanged("Name");
+ OnNameChanged();
+ }
+ }
+ }
+
+ /// Represents the navigator which is mapped onto the association 'ProductModelProductDescriptionCulture.Culture - Culture.ProductModelProductDescriptionCultures (m:1)'
+ public EntitySet ProductModelProductDescriptionCultures
+ {
+ get { return this._productModelProductDescriptionCultures; }
+ set { this._productModelProductDescriptionCultures.Assign(value); }
+ }
+
+ #endregion
+ }
+}
+#pragma warning restore 0649
\ No newline at end of file
diff --git a/tests/AdventureWorks2008Model/EntityClasses/Currency.cs b/tests/AdventureWorks2008Model/EntityClasses/Currency.cs
new file mode 100644
index 0000000..17a5793
--- /dev/null
+++ b/tests/AdventureWorks2008Model/EntityClasses/Currency.cs
@@ -0,0 +1,197 @@
+#pragma warning disable 0649
+//------------------------------------------------------------------------------
+// This code was generated by LLBLGen Pro v4.2.
+//------------------------------------------------------------------------------
+using System;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.ComponentModel;
+
+namespace ReadTestsAdventureWorks2008.EntityClasses
+{
+ /// Class which represents the entity 'Currency', mapped on table 'AdventureWorks.Sales.Currency'.
+ public partial class Currency : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+ #region Events
+ /// Event which is raised when a property value is changing.
+ public event PropertyChangingEventHandler PropertyChanging;
+ /// Event which is raised when a property value changes.
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Class Member Declarations
+ private System.String _currencyCode;
+ private System.DateTime _modifiedDate;
+ private System.String _name;
+ private EntitySet _countryRegionCurrencies;
+ private EntitySet _currencyRates;
+ private EntitySet _currencyRates1;
+ #endregion
+
+ #region Extensibility Method Definitions
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnCurrencyCodeChanging(System.String value);
+ partial void OnCurrencyCodeChanged();
+ partial void OnModifiedDateChanging(System.DateTime value);
+ partial void OnModifiedDateChanged();
+ partial void OnNameChanging(System.String value);
+ partial void OnNameChanged();
+ #endregion
+
+ /// Initializes a new instance of the class.
+ public Currency()
+ {
+ _countryRegionCurrencies = new EntitySet(new Action(this.Attach_CountryRegionCurrencies), new Action(this.Detach_CountryRegionCurrencies) );
+ _currencyRates = new EntitySet