diff --git a/.gitignore b/.gitignore
index 8844f4201..81d9e0a9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,3 +43,9 @@ BLToolkit.2010.sln.docstates
*.csproj.user
UnitTests/BLToolkit.Linq.VisualState.xml
UnitTests/Linq/UserDataProviders.txt
+!*.dll
+*.ncrunchsolution
+!*.exe
+!*.pdb
+BLToolkit.2012.opensdf
+ipch/examples.cpp-54293a33/examples.ipch
diff --git a/BLToolkit.2008.5.1.ReSharper b/BLToolkit.2008.5.1.ReSharper
deleted file mode 100644
index 42abd66f8..000000000
--- a/BLToolkit.2008.5.1.ReSharper
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- SOLUTION
-
-
-
- - public
- - protected
- - internal
- - private
- - new
- - abstract
- - virtual
- - override
- - sealed
- - static
- - readonly
- - extern
- - unsafe
- - volatile
-
- False
- True
- True
- False
- False
- False
- True
-
-
-
- - System
-
-
- - System
-
-
-
- $object$_On$event$
- $event$Handler
-
-
-
-
-
-
- $object$_On$event$
- $event$Handler
-
-
-
-
-
-
-
-
-
-
-
-
-
- $object$_On$event$
- $event$Handler
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/BLToolkit.2010.sln b/BLToolkit.2010.sln
index 30277c4ab..783ea0a9b 100644
--- a/BLToolkit.2010.sln
+++ b/BLToolkit.2010.sln
@@ -149,6 +149,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.4.JointureAddOn",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{218E3584-CDC7-4A77-AD1A-CF9FBE90F67F}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Regression", "UnitTests\UnitTests.Regression\UnitTests.Regression.csproj", "{74D1AF0E-C0AB-4A62-99A3-0975585760A5}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{4A9C0E31-8697-48BA-A46B-6A5EE78424D6}"
ProjectSection(SolutionItems) = preProject
NuGet\BLToolkit.DB2.nuspec = NuGet\BLToolkit.DB2.nuspec
@@ -171,10 +173,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.CP.4", "Source\BL
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthwindDataService", "Demo\WebServices\NorthwindDataService\NorthwindDataService.csproj", "{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.OracleManaged.4", "DataProviders\Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj", "{785CE174-0A91-465F-9E41-65E6E05A0EC9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.OracleManaged.4", "DataProviders\Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj", "{61985B06-67FD-4941-B1B0-7F3794FD237C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.DevartOracle.4", "DataProviders\DevartOraclePro\BLToolkit.Data.DataProvider.DevartOracle.4.csproj", "{CB303F0B-0AA3-4589-850A-95E985A09492}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.Generic.4", "DataProviders\Generic\BLToolkit.Data.DataProvider.Generic.4.csproj", "{6E7FE7FC-551F-4273-ACEB-72DC0D01120E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug FW 3.5|Any CPU = Debug FW 3.5|Any CPU
@@ -1283,7 +1287,6 @@ Global
{7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|Any CPU.Build.0 = Debug|Any CPU
{7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
{7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|Win32.ActiveCfg = Debug|Any CPU
{7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|x64.ActiveCfg = Debug|Any CPU
{7DAA2EBB-A724-498F-93BB-68966E2B738F}.Release|x86.ActiveCfg = Debug|Any CPU
@@ -1764,6 +1767,46 @@ Global
{9FD2722C-1E6C-4061-8AC0-32EE28808FC0}.Template|Win32.ActiveCfg = Release|Any CPU
{9FD2722C-1E6C-4061-8AC0-32EE28808FC0}.Template|x64.ActiveCfg = Release|Any CPU
{9FD2722C-1E6C-4061-8AC0-32EE28808FC0}.Template|x86.ActiveCfg = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug FW 3.5|Any CPU.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug FW 3.5|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug FW 3.5|Win32.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug FW 3.5|x64.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug FW 3.5|x86.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|Any CPU.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|Any CPU.Build.0 = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|Mixed Platforms.Build.0 = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|Win32.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|x64.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.DebugMono|x86.ActiveCfg = DebugMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|Win32.ActiveCfg = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|x64.ActiveCfg = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Release|x86.ActiveCfg = Release|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|Any CPU.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|Any CPU.Build.0 = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|Win32.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|x64.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.ReleaseMono|x86.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|Any CPU.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|Any CPU.Build.0 = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|Win32.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|x64.ActiveCfg = ReleaseMono|Any CPU
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5}.Template|x86.ActiveCfg = ReleaseMono|Any CPU
{0C325F5D-E50E-4340-8724-D29896CCC584}.Debug FW 3.5|Any CPU.ActiveCfg = Debug FW 3.5|Any CPU
{0C325F5D-E50E-4340-8724-D29896CCC584}.Debug FW 3.5|Any CPU.Build.0 = Debug FW 3.5|Any CPU
{0C325F5D-E50E-4340-8724-D29896CCC584}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug FW 3.5|Any CPU
@@ -1890,48 +1933,48 @@ Global
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}.Template|Win32.ActiveCfg = Release|Any CPU
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}.Template|x64.ActiveCfg = Release|Any CPU
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}.Template|x86.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Any CPU.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Any CPU.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Mixed Platforms.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Win32.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|x64.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|x86.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|x64.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|x86.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Any CPU.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Any CPU.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Mixed Platforms.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Win32.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|x64.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|x86.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Any CPU.Build.0 = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Win32.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|x64.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|x86.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Any CPU.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Any CPU.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Win32.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|x64.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|x86.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Any CPU.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Any CPU.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Win32.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|x64.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|x86.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Any CPU.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Any CPU.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Mixed Platforms.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Win32.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|x64.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|x86.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Any CPU.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Any CPU.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Mixed Platforms.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Win32.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|x64.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|x86.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Win32.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|x64.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|x86.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Any CPU.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Any CPU.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Win32.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|x64.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|x86.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Any CPU.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Any CPU.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Win32.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|x64.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|x86.ActiveCfg = ReleaseMono|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Debug FW 3.5|Any CPU.ActiveCfg = Debug|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Debug FW 3.5|Any CPU.Build.0 = Debug|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -1974,20 +2017,60 @@ Global
{CB303F0B-0AA3-4589-850A-95E985A09492}.Template|Win32.ActiveCfg = Release|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Template|x64.ActiveCfg = Release|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Template|x86.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Any CPU.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Win32.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|x64.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|x86.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Any CPU.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Win32.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|x64.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|x86.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Win32.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|x64.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|x86.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Any CPU.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Win32.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|x64.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|x86.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Any CPU.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Win32.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|x64.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D527524F-EC92-465E-9CAE-86278121675A} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
- {D11617AB-9F88-4C74-8ABD-F8580DB4B01B} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
- {07997A18-86D3-47AC-A514-AB1B03E6AEC8} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
{4FDE7340-F60F-49BC-86CD-756CCD26C92A} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
{2BB4AD77-190F-4D7E-A83E-7B254A0A1FCA} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
{6AE74A35-B337-4B17-8092-E1B98DEF06AF} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
+ {74D1AF0E-C0AB-4A62-99A3-0975585760A5} = {2CC0A340-512C-4F0D-A5E6-87C042EE13B9}
{6E0C5565-F9A3-441C-9CB2-8B1878A800EF} = {C0306556-68F4-4DD5-95F2-AAFEE8FACDFA}
{65FC918C-FF12-4C75-96F5-180B552989E5} = {C0306556-68F4-4DD5-95F2-AAFEE8FACDFA}
- {F2B014F7-3807-4938-8F02-3CF8247C47DC} = {C0306556-68F4-4DD5-95F2-AAFEE8FACDFA}
{86BF4F10-3606-4016-9919-84C3335813B6} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{C1F8C201-BBD9-44F4-884C-CFF8CC960B68} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{B1DEA25C-7667-471B-BBAD-64D017FDD104} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
@@ -1997,8 +2080,9 @@ Global
{85E90F57-8DE1-4912-8414-28578F4D71CD} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{3E414663-B673-47A8-AB59-0E08FE43DA86} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{6CD8CC3D-643D-4D09-8660-A26085C44FBC} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
- {785CE174-0A91-465F-9E41-65E6E05A0EC9} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{CB303F0B-0AA3-4589-850A-95E985A09492} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
+ {61985B06-67FD-4941-B1B0-7F3794FD237C} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{83C0070F-E639-4D65-B392-34F621165A1C} = {B75C60BF-F5B7-472E-A0A8-8A12DDDDAA7D}
{0F3F166F-9927-4BC0-855F-ADB0D20218F1} = {B75C60BF-F5B7-472E-A0A8-8A12DDDDAA7D}
{35E61C2A-2B8C-4AF4-AD21-353936581EF5} = {B75C60BF-F5B7-472E-A0A8-8A12DDDDAA7D}
@@ -2021,8 +2105,6 @@ Global
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423} = {2F6B63C4-295A-433C-91CB-CAE4CADE6B8B}
{FF377109-1931-499F-9346-449D259977F2} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
{34989C73-F82A-4905-9349-D0CF1419CD1C} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
- {308A4189-53AB-460D-B2B1-0EB4B9219654} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
- {8DA66999-005A-49AB-86A9-2C1F62905B50} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
{9FD2722C-1E6C-4061-8AC0-32EE28808FC0} = {218E3584-CDC7-4A77-AD1A-CF9FBE90F67F}
EndGlobalSection
EndGlobal
diff --git a/BLToolkit.2012.sln b/BLToolkit.2012.sln
index ead6b8f9b..af05f6e06 100644
--- a/BLToolkit.2012.sln
+++ b/BLToolkit.2012.sln
@@ -115,8 +115,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Demo\WebServices\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{8A7F38C5-EF9A-410B-8539-A58879F3AA22}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Examples.Cpp", "Examples\Cpp\Examples.Cpp.vcxproj", "{FF377109-1931-499F-9346-449D259977F2}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples.CS", "Examples\CS\Examples.CS.csproj", "{34989C73-F82A-4905-9349-D0CF1419CD1C}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Examples.VB", "Examples\VB\Examples.VB.vbproj", "{308A4189-53AB-460D-B2B1-0EB4B9219654}"
@@ -170,12 +168,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.CP.4", "Source\BL
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthwindDataService", "Demo\WebServices\NorthwindDataService\NorthwindDataService.csproj", "{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.OracleManaged.4", "DataProviders\Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj", "{785CE174-0A91-465F-9E41-65E6E05A0EC9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.OracleManaged.4", "DataProviders\Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj", "{61985B06-67FD-4941-B1B0-7F3794FD237C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.DevartOracle.4", "DataProviders\DevartOraclePro\BLToolkit.Data.DataProvider.DevartOracle.4.csproj", "{CB303F0B-0AA3-4589-850A-95E985A09492}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLToolkit.Data.DataProvider.Generic.4", "DataProviders\Generic\BLToolkit.Data.DataProvider.Generic.4.csproj", "{6E7FE7FC-551F-4273-ACEB-72DC0D01120E}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Fluent", "UnitTests\Fluent\UnitTests.Fluent.csproj", "{527300F8-9F04-434C-8239-4FE5E174FF6B}"
EndProject
+<<<<<<< HEAD
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Examples.Cpp", "Examples\Cpp\Examples.Cpp.vcxproj", "{9D063CAA-4C44-4C5E-9C9E-74EFA4049FEC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {0C325F5D-E50E-4340-8724-D29896CCC583} = {0C325F5D-E50E-4340-8724-D29896CCC583}
+ EndProjectSection
+EndProject
+=======
+>>>>>>> 53d1ceacdf65b20d099321f78348d626df085662
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug FW 3.5|Any CPU = Debug FW 3.5|Any CPU
@@ -1428,49 +1436,6 @@ Global
{4EBBF9E9-53B2-493C-ABAB-E915C187558F}.Template|Win32.ActiveCfg = Release|Any CPU
{4EBBF9E9-53B2-493C-ABAB-E915C187558F}.Template|x64.ActiveCfg = Release|Any CPU
{4EBBF9E9-53B2-493C-ABAB-E915C187558F}.Template|x86.ActiveCfg = Release|Any CPU
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|Any CPU.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|Mixed Platforms.Build.0 = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|Win32.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|Win32.Build.0 = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|x64.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug FW 3.5|x86.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|Any CPU.Build.0 = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|Win32.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|Win32.Build.0 = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|x64.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Debug|x86.ActiveCfg = Debug|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|Any CPU.ActiveCfg = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|Mixed Platforms.ActiveCfg = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|Mixed Platforms.Build.0 = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|Win32.ActiveCfg = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|Win32.Build.0 = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|x64.ActiveCfg = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.DebugMono|x86.ActiveCfg = DebugMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|Any CPU.ActiveCfg = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|Mixed Platforms.Build.0 = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|Win32.ActiveCfg = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|Win32.Build.0 = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|x64.ActiveCfg = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Release|x86.ActiveCfg = Release|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|Any CPU.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|Mixed Platforms.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|Mixed Platforms.Build.0 = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|Win32.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|Win32.Build.0 = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|x64.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.ReleaseMono|x86.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|Any CPU.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|Mixed Platforms.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|Mixed Platforms.Build.0 = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|Win32.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|Win32.Build.0 = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|x64.ActiveCfg = ReleaseMono|Win32
- {FF377109-1931-499F-9346-449D259977F2}.Template|x86.ActiveCfg = ReleaseMono|Win32
{34989C73-F82A-4905-9349-D0CF1419CD1C}.Debug FW 3.5|Any CPU.ActiveCfg = DebugMono|Any CPU
{34989C73-F82A-4905-9349-D0CF1419CD1C}.Debug FW 3.5|Any CPU.Build.0 = DebugMono|Any CPU
{34989C73-F82A-4905-9349-D0CF1419CD1C}.Debug FW 3.5|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
@@ -1891,48 +1856,48 @@ Global
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}.Template|Win32.ActiveCfg = Release|Any CPU
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}.Template|x64.ActiveCfg = Release|Any CPU
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423}.Template|x86.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Any CPU.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Any CPU.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Mixed Platforms.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|Win32.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|x64.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug FW 3.5|x86.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|x64.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Debug|x86.ActiveCfg = Debug|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Any CPU.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Any CPU.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Mixed Platforms.Build.0 = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|Win32.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|x64.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.DebugMono|x86.ActiveCfg = DebugMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Any CPU.Build.0 = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|Win32.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|x64.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Release|x86.ActiveCfg = Release|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Any CPU.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Any CPU.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|Win32.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|x64.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.ReleaseMono|x86.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Any CPU.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Any CPU.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|Win32.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|x64.ActiveCfg = ReleaseMono|Any CPU
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}.Template|x86.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Any CPU.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Any CPU.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Mixed Platforms.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|Win32.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|x64.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug FW 3.5|x86.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Any CPU.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Any CPU.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Mixed Platforms.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Mixed Platforms.Build.0 = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|Win32.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|x64.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.DebugMono|x86.ActiveCfg = DebugMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|Win32.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|x64.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Release|x86.ActiveCfg = Release|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Any CPU.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Any CPU.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|Win32.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|x64.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.ReleaseMono|x86.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Any CPU.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Any CPU.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Mixed Platforms.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Mixed Platforms.Build.0 = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|Win32.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|x64.ActiveCfg = ReleaseMono|Any CPU
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}.Template|x86.ActiveCfg = ReleaseMono|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Debug FW 3.5|Any CPU.ActiveCfg = Debug|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Debug FW 3.5|Any CPU.Build.0 = Debug|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -1975,6 +1940,48 @@ Global
{CB303F0B-0AA3-4589-850A-95E985A09492}.Template|Win32.ActiveCfg = Release|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Template|x64.ActiveCfg = Release|Any CPU
{CB303F0B-0AA3-4589-850A-95E985A09492}.Template|x86.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Any CPU.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|Win32.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|x64.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug FW 3.5|x86.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Any CPU.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|Win32.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|x64.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.DebugMono|x86.ActiveCfg = Debug|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|Win32.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|x64.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Release|x86.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Any CPU.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|Win32.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|x64.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.ReleaseMono|x86.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Any CPU.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|Win32.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|x64.ActiveCfg = Release|Any CPU
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E}.Template|x86.ActiveCfg = Release|Any CPU
{527300F8-9F04-434C-8239-4FE5E174FF6B}.Debug FW 3.5|Any CPU.ActiveCfg = Debug|Any CPU
{527300F8-9F04-434C-8239-4FE5E174FF6B}.Debug FW 3.5|Any CPU.Build.0 = Debug|Any CPU
{527300F8-9F04-434C-8239-4FE5E174FF6B}.Debug FW 3.5|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -2016,7 +2023,7 @@ Global
{527300F8-9F04-434C-8239-4FE5E174FF6B}.Template|Mixed Platforms.Build.0 = Release|Any CPU
{527300F8-9F04-434C-8239-4FE5E174FF6B}.Template|Win32.ActiveCfg = Release|Any CPU
{527300F8-9F04-434C-8239-4FE5E174FF6B}.Template|x64.ActiveCfg = Release|Any CPU
- {527300F8-9F04-434C-8239-4FE5E174FF6B}.Template|x86.ActiveCfg = Release|Any CPU
+ {527300F8-9F04-434C-8239-4FE5E174FF6B}.Template|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2041,8 +2048,9 @@ Global
{85E90F57-8DE1-4912-8414-28578F4D71CD} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{3E414663-B673-47A8-AB59-0E08FE43DA86} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{6CD8CC3D-643D-4D09-8660-A26085C44FBC} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
- {785CE174-0A91-465F-9E41-65E6E05A0EC9} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
+ {61985B06-67FD-4941-B1B0-7F3794FD237C} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{CB303F0B-0AA3-4589-850A-95E985A09492} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
+ {6E7FE7FC-551F-4273-ACEB-72DC0D01120E} = {E6CE0ECB-3373-4DC0-98CB-F4E9DC2293C4}
{83C0070F-E639-4D65-B392-34F621165A1C} = {B75C60BF-F5B7-472E-A0A8-8A12DDDDAA7D}
{0F3F166F-9927-4BC0-855F-ADB0D20218F1} = {B75C60BF-F5B7-472E-A0A8-8A12DDDDAA7D}
{35E61C2A-2B8C-4AF4-AD21-353936581EF5} = {B75C60BF-F5B7-472E-A0A8-8A12DDDDAA7D}
@@ -2063,7 +2071,6 @@ Global
{711A3803-4395-4E92-9B26-DC8DDDF80366} = {2F6B63C4-295A-433C-91CB-CAE4CADE6B8B}
{4EBBF9E9-53B2-493C-ABAB-E915C187558F} = {2F6B63C4-295A-433C-91CB-CAE4CADE6B8B}
{87FB4F28-5DCC-4F21-B83E-59C85E1A7423} = {2F6B63C4-295A-433C-91CB-CAE4CADE6B8B}
- {FF377109-1931-499F-9346-449D259977F2} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
{34989C73-F82A-4905-9349-D0CF1419CD1C} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
{308A4189-53AB-460D-B2B1-0EB4B9219654} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
{8DA66999-005A-49AB-86A9-2C1F62905B50} = {8A7F38C5-EF9A-410B-8539-A58879F3AA22}
diff --git a/Data/BLToolkitData.mdb b/Data/BLToolkitData.mdb
index da3924256..b46db5de1 100644
Binary files a/Data/BLToolkitData.mdb and b/Data/BLToolkitData.mdb differ
diff --git a/Data/BLToolkitData.sdf b/Data/BLToolkitData.sdf
index 1fc88217a..9a0eaf777 100644
Binary files a/Data/BLToolkitData.sdf and b/Data/BLToolkitData.sdf differ
diff --git a/Data/BLToolkitData.sqlite b/Data/BLToolkitData.sqlite
index 8e3300157..76fd5a710 100644
Binary files a/Data/BLToolkitData.sqlite and b/Data/BLToolkitData.sqlite differ
diff --git a/Data/Create Scripts/Firebird2.sql b/Data/Create Scripts/Firebird2.sql
index e1243a144..8c92636aa 100644
--- a/Data/Create Scripts/Firebird2.sql
+++ b/Data/Create Scripts/Firebird2.sql
@@ -22,6 +22,8 @@ DROP GENERATOR DataTypeID; COMMIT;
DROP GENERATOR PersonID; COMMIT;
DROP GENERATOR TimestampGen; COMMIT;
+DROP VIEW PersonView; COMMIT;
+
DROP TABLE Dual; COMMIT;
DROP TABLE DataTypeTest; COMMIT;
DROP TABLE BinaryData; COMMIT;
@@ -282,7 +284,7 @@ AS
BEGIN
FOR
SELECT
- Person.PersonID,
+ Person.PersonID,
FirstName,
LastName,
MiddleName,
@@ -293,10 +295,10 @@ BEGIN
WHERE
Patient.PersonID = Person.PersonID
INTO
- :PersonID,
- :FirstName,
- :LastName,
- :MiddleName,
+ :PersonID,
+ :FirstName,
+ :LastName,
+ :MiddleName,
:Gender,
:Diagnosis
DO SUSPEND;
@@ -527,9 +529,9 @@ DROP TABLE Parent COMMIT;
DROP TABLE Child COMMIT;
DROP TABLE GrandChild COMMIT;
-CREATE TABLE Parent (ParentID int, Value1 int) COMMIT;
-CREATE TABLE Child (ParentID int, ChildID int) COMMIT;
-CREATE TABLE GrandChild (ParentID int, ChildID int, GrandChildID int) COMMIT;
+CREATE TABLE Parent (ParentID int, Value1 int) COMMIT;
+CREATE TABLE Child (ParentID int, ChildID int) COMMIT;
+CREATE TABLE GrandChild (ParentID int, ChildID int, GrandChildID int) COMMIT;
DROP TABLE LinqDataTypes COMMIT;
@@ -588,3 +590,9 @@ AS BEGIN
NEW.ID = GEN_ID(TestIdentityID, 1);
END
COMMIT;
+
+
+CREATE VIEW PersonView
+AS
+ SELECT * FROM Person
+COMMIT;
diff --git a/Data/Create Scripts/MsSql.sql b/Data/Create Scripts/MsSql.sql
index 21149b5e9..73b83f019 100644
--- a/Data/Create Scripts/MsSql.sql
+++ b/Data/Create Scripts/MsSql.sql
@@ -528,6 +528,7 @@ GO
-- SKIP Sql2005 END
-- SKIP Sql2008 BEGIN
+-- SKIP Sql2012 BEGIN
CREATE TABLE LinqDataTypes
(
ID int,
@@ -542,6 +543,7 @@ CREATE TABLE LinqDataTypes
BigIntValue bigint NULL
)
GO
+-- SKIP Sql2012 END
-- SKIP Sql2008 END
DROP TABLE TestIdentity
diff --git a/Data/Create Scripts/Sybase.sql b/Data/Create Scripts/Sybase.sql
index 573b18441..77ec42af0 100644
--- a/Data/Create Scripts/Sybase.sql
+++ b/Data/Create Scripts/Sybase.sql
@@ -468,7 +468,8 @@ GO
DROP TABLE TestIdentity
GO
-CREATE TABLE TestIdentity (
+CREATE TABLE TestIdentity
+(
ID int IDENTITY CONSTRAINT PK_TestIdentity PRIMARY KEY CLUSTERED
)
GO
diff --git a/DataProviders/Compile4.bat b/DataProviders/Compile4.bat
index 603f6bc54..b5a536669 100644
--- a/DataProviders/Compile4.bat
+++ b/DataProviders/Compile4.bat
@@ -1,22 +1,24 @@
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe DB2\BLToolkit.Data.DataProvider.DB2.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Firebird\BLToolkit.Data.DataProvider.Firebird.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Informix\BLToolkit.Data.DataProvider.Informix.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySql\BLToolkit.Data.DataProvider.MySql.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.Oracle.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe PostgreSQL\BLToolkit.Data.DataProvider.PostgreSQL.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SqlCe\BLToolkit.Data.DataProvider.SqlCe.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SQLite\BLToolkit.Data.DataProvider.SQLite.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Sybase\BLToolkit.Data.DataProvider.Sybase.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe DB2\BLToolkit.Data.DataProvider.DB2.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Firebird\BLToolkit.Data.DataProvider.Firebird.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Informix\BLToolkit.Data.DataProvider.Informix.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySql\BLToolkit.Data.DataProvider.MySql.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.Oracle.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe DevartOraclePro\BLToolkit.Data.DataProvider.DevartOracle.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe PostgreSQL\BLToolkit.Data.DataProvider.PostgreSQL.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SqlCe\BLToolkit.Data.DataProvider.SqlCe.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SQLite\BLToolkit.Data.DataProvider.SQLite.4.csproj /property:Configuration=Debug
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Sybase\BLToolkit.Data.DataProvider.Sybase.4.csproj /property:Configuration=Debug
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe DB2\BLToolkit.Data.DataProvider.DB2.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Firebird\BLToolkit.Data.DataProvider.Firebird.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Informix\BLToolkit.Data.DataProvider.Informix.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySql\BLToolkit.Data.DataProvider.MySql.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.Oracle.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe PostgreSQL\BLToolkit.Data.DataProvider.PostgreSQL.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SqlCe\BLToolkit.Data.DataProvider.SqlCe.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SQLite\BLToolkit.Data.DataProvider.SQLite.4.csproj /property:Configuration=Release
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Sybase\BLToolkit.Data.DataProvider.Sybase.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe DB2\BLToolkit.Data.DataProvider.DB2.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Firebird\BLToolkit.Data.DataProvider.Firebird.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Informix\BLToolkit.Data.DataProvider.Informix.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySql\BLToolkit.Data.DataProvider.MySql.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.Oracle.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Oracle\BLToolkit.Data.DataProvider.OracleManaged.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe DevartOraclePro\BLToolkit.Data.DataProvider.DevartOracle.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe PostgreSQL\BLToolkit.Data.DataProvider.PostgreSQL.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SqlCe\BLToolkit.Data.DataProvider.SqlCe.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe SQLite\BLToolkit.Data.DataProvider.SQLite.4.csproj /property:Configuration=Release
+%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Sybase\BLToolkit.Data.DataProvider.Sybase.4.csproj /property:Configuration=Release
pause
\ No newline at end of file
diff --git a/DataProviders/DevartOraclePro/BLToolkit.Data.DataProvider.DevartOracle.4.csproj b/DataProviders/DevartOraclePro/BLToolkit.Data.DataProvider.DevartOracle.4.csproj
index 4f3e4c01b..5ed29432e 100644
--- a/DataProviders/DevartOraclePro/BLToolkit.Data.DataProvider.DevartOracle.4.csproj
+++ b/DataProviders/DevartOraclePro/BLToolkit.Data.DataProvider.DevartOracle.4.csproj
@@ -30,13 +30,13 @@
4
-
+
False
- ..\..\packages\dotConnect.Express.for.Oracle.7.6.192\lib\Devart.Data.dll
+ ..\..\packages\dotConnect.Express.for.Oracle.8.1.36\lib\Devart.Data.dll
-
+
False
- ..\..\packages\dotConnect.Express.for.Oracle.7.6.192\lib\Devart.Data.Oracle.dll
+ ..\..\packages\dotConnect.Express.for.Oracle.8.1.36\lib\Devart.Data.Oracle.dll
diff --git a/DataProviders/DevartOraclePro/app.config b/DataProviders/DevartOraclePro/app.config
index d8f0bbed6..48410298d 100644
--- a/DataProviders/DevartOraclePro/app.config
+++ b/DataProviders/DevartOraclePro/app.config
@@ -1,8 +1,8 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DataProviders/DevartOraclePro/packages.config b/DataProviders/DevartOraclePro/packages.config
index 8ac45b357..cb4fa1177 100644
--- a/DataProviders/DevartOraclePro/packages.config
+++ b/DataProviders/DevartOraclePro/packages.config
@@ -1,4 +1,4 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/DataProviders/Firebird/BLToolkit.Data.DataProvider.Firebird.4.csproj b/DataProviders/Firebird/BLToolkit.Data.DataProvider.Firebird.4.csproj
index dc7aae87e..a786d4161 100644
--- a/DataProviders/Firebird/BLToolkit.Data.DataProvider.Firebird.4.csproj
+++ b/DataProviders/Firebird/BLToolkit.Data.DataProvider.Firebird.4.csproj
@@ -86,9 +86,9 @@
false
-
+
False
- ..\..\packages\FirebirdSql.Data.FirebirdClient.3.0.2.1\lib\net40-client\FirebirdSql.Data.FirebirdClient.dll
+ ..\..\packages\FirebirdSql.Data.FirebirdClient.4.0.0.0\lib\net40-client\FirebirdSql.Data.FirebirdClient.dll
@@ -130,7 +130,9 @@
-
+
+ Designer
+
+
\ No newline at end of file
diff --git a/DataProviders/Generic/Properties/AssemblyInfo.cs b/DataProviders/Generic/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..c5eb0a369
--- /dev/null
+++ b/DataProviders/Generic/Properties/AssemblyInfo.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Runtime.InteropServices;
+using System.Security;
+
+using BLToolkit;
+
+[assembly: AssemblyTitle (BLToolkitConstants.ProductName + " Data Provider")]
+[assembly: AssemblyDescription (BLToolkitConstants.ProductDescription + " Data Provider")]
+[assembly: AssemblyProduct (BLToolkitConstants.ProductName + " Data Provider")]
+[assembly: AssemblyCopyright (BLToolkitConstants.Copyright)]
+[assembly: AssemblyCulture ("")]
+[assembly: ComVisible (false)]
+[assembly: Guid ("6c3fb028-daf7-4134-8697-eedfe34d779e")]
+[assembly: AssemblyVersion (BLToolkitConstants.FullVersionString)]
+[assembly: AssemblyFileVersion (BLToolkitConstants.FullVersionString)]
+[assembly: CLSCompliant (true)]
+[assembly: NeutralResourcesLanguage("en-US")]
+//[assembly: AllowPartiallyTrustedCallers]
diff --git a/DataProviders/MySql/BLToolkit.Data.DataProvider.MySql.4.csproj b/DataProviders/MySql/BLToolkit.Data.DataProvider.MySql.4.csproj
index 6067bbae7..09d9effdb 100644
--- a/DataProviders/MySql/BLToolkit.Data.DataProvider.MySql.4.csproj
+++ b/DataProviders/MySql/BLToolkit.Data.DataProvider.MySql.4.csproj
@@ -88,9 +88,9 @@
4
-
+
False
- ..\..\packages\MySql.Data.6.6.4\lib\net40\MySql.Data.dll
+ ..\..\packages\MySql.Data.6.8.3\lib\net40\MySql.Data.dll
diff --git a/DataProviders/MySql/packages.config b/DataProviders/MySql/packages.config
index da2b3c58e..c28edff16 100644
--- a/DataProviders/MySql/packages.config
+++ b/DataProviders/MySql/packages.config
@@ -1,4 +1,4 @@

-
+
\ No newline at end of file
diff --git a/DataProviders/Oracle/BLToolkit.Data.DataProvider.Oracle.4.csproj b/DataProviders/Oracle/BLToolkit.Data.DataProvider.Oracle.4.csproj
index ecd5f0fc1..6a750acac 100644
--- a/DataProviders/Oracle/BLToolkit.Data.DataProvider.Oracle.4.csproj
+++ b/DataProviders/Oracle/BLToolkit.Data.DataProvider.Oracle.4.csproj
@@ -84,8 +84,14 @@
;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
-
- ..\..\packages\odp.net.x86.112.3.20\lib\net40\Oracle.DataAccess.dll
+
+ C:/app/Valeriu.Lacatusu/product/11.2.0/client_2/odp.net/bin/2.x/Oracle.DataAccess.dll
+ False
+ True
+
+
+ False
+ ..\..\packages\odp.net.managed.121.1.1\lib\net40\Oracle.ManagedDataAccess.dll
diff --git a/DataProviders/Oracle/BLToolkit.Data.DataProvider.OracleManaged.4.csproj b/DataProviders/Oracle/BLToolkit.Data.DataProvider.OracleManaged.4.csproj
index 74192cde2..2beb47c89 100644
--- a/DataProviders/Oracle/BLToolkit.Data.DataProvider.OracleManaged.4.csproj
+++ b/DataProviders/Oracle/BLToolkit.Data.DataProvider.OracleManaged.4.csproj
@@ -5,7 +5,7 @@
AnyCPU
9.0.30729
2.0
- {785CE174-0A91-465F-9E41-65E6E05A0EC9}
+ {61985B06-67FD-4941-B1B0-7F3794FD237C}
Library
Properties
BLToolkit.Data.DataProvider.Oracle
@@ -84,9 +84,9 @@
;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
-
+
False
- ..\..\Redist\Oracle\Oracle.ManagedDataAccess.dll
+ ..\..\packages\odp.net.managed.121.1.0\lib\net40\Oracle.ManagedDataAccess.dll
diff --git a/DataProviders/Oracle/packages.config b/DataProviders/Oracle/packages.config
index aa5f8e80d..9a6d4ead1 100644
--- a/DataProviders/Oracle/packages.config
+++ b/DataProviders/Oracle/packages.config
@@ -1,4 +1,5 @@

+
\ No newline at end of file
diff --git a/DataProviders/PostgreSQL/BLToolkit.Data.DataProvider.PostgreSQL.4.csproj b/DataProviders/PostgreSQL/BLToolkit.Data.DataProvider.PostgreSQL.4.csproj
index 77113628f..fc3c474ae 100644
--- a/DataProviders/PostgreSQL/BLToolkit.Data.DataProvider.PostgreSQL.4.csproj
+++ b/DataProviders/PostgreSQL/BLToolkit.Data.DataProvider.PostgreSQL.4.csproj
@@ -86,17 +86,13 @@
false
-
+
False
- ..\..\packages\Npgsql.2.0.12.1\lib\net40\Mono.Security.dll
+ ..\..\packages\Npgsql.2.0.14.3\lib\net40\Mono.Security.dll
-
+
False
- ..\..\packages\Npgsql.2.0.12.1\lib\net40\Npgsql.dll
-
-
- False
- ..\..\packages\Npgsql.2.0.12.1\lib\net40\policy.2.0.Npgsql.dll
+ ..\..\packages\Npgsql.2.0.14.3\lib\net40\Npgsql.dll
diff --git a/DataProviders/PostgreSQL/packages.config b/DataProviders/PostgreSQL/packages.config
index d81e2cf48..deb69078b 100644
--- a/DataProviders/PostgreSQL/packages.config
+++ b/DataProviders/PostgreSQL/packages.config
@@ -1,4 +1,4 @@

-
+
\ No newline at end of file
diff --git a/DataProviders/SQLite/BLToolkit.Data.DataProvider.SQLite.4.csproj b/DataProviders/SQLite/BLToolkit.Data.DataProvider.SQLite.4.csproj
index dbf9ec342..d02a754da 100644
--- a/DataProviders/SQLite/BLToolkit.Data.DataProvider.SQLite.4.csproj
+++ b/DataProviders/SQLite/BLToolkit.Data.DataProvider.SQLite.4.csproj
@@ -91,13 +91,13 @@
3.5
-
+
False
- ..\..\packages\System.Data.SQLite.1.0.84.0\lib\net40\System.Data.SQLite.dll
+ ..\..\packages\System.Data.SQLite.1.0.90.0\lib\net40\System.Data.SQLite.dll
-
+
False
- ..\..\packages\System.Data.SQLite.1.0.84.0\lib\net40\System.Data.SQLite.Linq.dll
+ ..\..\packages\System.Data.SQLite.1.0.90.0\lib\net40\System.Data.SQLite.Linq.dll
diff --git a/DataProviders/SQLite/packages.config b/DataProviders/SQLite/packages.config
index 3b4b30c34..bada5103e 100644
--- a/DataProviders/SQLite/packages.config
+++ b/DataProviders/SQLite/packages.config
@@ -1,4 +1,4 @@

-
+
\ No newline at end of file
diff --git a/DataProviders/SQLite/x64/SQLite.Interop.dll b/DataProviders/SQLite/x64/SQLite.Interop.dll
index 01d8a6563..30e752000 100644
Binary files a/DataProviders/SQLite/x64/SQLite.Interop.dll and b/DataProviders/SQLite/x64/SQLite.Interop.dll differ
diff --git a/DataProviders/SQLite/x86/SQLite.Interop.dll b/DataProviders/SQLite/x86/SQLite.Interop.dll
index 06ad1589d..092ed077a 100644
Binary files a/DataProviders/SQLite/x86/SQLite.Interop.dll and b/DataProviders/SQLite/x86/SQLite.Interop.dll differ
diff --git a/Demo/Partial.Trust/Asp.Net/Partial.Trust.Asp.Net.csproj b/Demo/Partial.Trust/Asp.Net/Partial.Trust.Asp.Net.csproj
index 7f83922f8..374d4007a 100644
--- a/Demo/Partial.Trust/Asp.Net/Partial.Trust.Asp.Net.csproj
+++ b/Demo/Partial.Trust/Asp.Net/Partial.Trust.Asp.Net.csproj
@@ -19,6 +19,10 @@
false
+
+
+
+
true
@@ -137,7 +141,7 @@
False
True
- 59174
+ 55400
/
diff --git a/Demo/WebServices/NorthwindDataService/NorthwindDataService.csproj b/Demo/WebServices/NorthwindDataService/NorthwindDataService.csproj
index c479a37f2..daf0f78cf 100644
--- a/Demo/WebServices/NorthwindDataService/NorthwindDataService.csproj
+++ b/Demo/WebServices/NorthwindDataService/NorthwindDataService.csproj
@@ -19,6 +19,10 @@
4.0
+
+
+
+
true
@@ -126,7 +130,7 @@
False
True
- 58025
+ 55407
/
diff --git a/Demo/WebServices/Server/Server.csproj b/Demo/WebServices/Server/Server.csproj
index f32bb2ddb..d67d4300b 100644
--- a/Demo/WebServices/Server/Server.csproj
+++ b/Demo/WebServices/Server/Server.csproj
@@ -18,14 +18,15 @@
OnOutputUpdated
- 4.0
+ 3.5
+
false
-
-
-
-
+
+
+
+
true
@@ -142,7 +143,7 @@
False
False
- 59179
+ 12583
/
diff --git a/Examples/CS/Examples.CS.csproj b/Examples/CS/Examples.CS.csproj
index ef50f4c4d..2aa1d5380 100644
--- a/Examples/CS/Examples.CS.csproj
+++ b/Examples/CS/Examples.CS.csproj
@@ -84,9 +84,9 @@
true
-
+
False
- ..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll
+ ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll
diff --git a/Examples/CS/packages.config b/Examples/CS/packages.config
index 617647af2..5a3253fcb 100644
--- a/Examples/CS/packages.config
+++ b/Examples/CS/packages.config
@@ -1,4 +1,4 @@

-
+
\ No newline at end of file
diff --git a/Examples/Cpp/AssemblyInfo.cpp b/Examples/Cpp/AssemblyInfo.cpp
index e1c55e9cf..6b9c73e9c 100644
--- a/Examples/Cpp/AssemblyInfo.cpp
+++ b/Examples/Cpp/AssemblyInfo.cpp
@@ -14,9 +14,9 @@ using namespace System::Security::Permissions;
[assembly:AssemblyTitleAttribute("ExamplesCpp")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
-[assembly:AssemblyCompanyAttribute("Microsoft")];
+[assembly:AssemblyCompanyAttribute("")];
[assembly:AssemblyProductAttribute("ExamplesCpp")];
-[assembly:AssemblyCopyrightAttribute("Copyright (c) Microsoft 2011")];
+[assembly:AssemblyCopyrightAttribute("Copyright (c) 2013")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
diff --git a/Examples/Cpp/Examples.Cpp.vcxproj b/Examples/Cpp/Examples.Cpp.vcxproj
index 8746e4367..80209ea41 100644
--- a/Examples/Cpp/Examples.Cpp.vcxproj
+++ b/Examples/Cpp/Examples.Cpp.vcxproj
@@ -1,18 +1,10 @@

-
- DebugMono
- Win32
-
Debug
Win32
-
- ReleaseMono
- Win32
-
Release
Win32
@@ -28,30 +20,16 @@
DynamicLibrary
true
+ v110
true
Unicode
- v100
-
-
- DynamicLibrary
- true
- true
- Unicode
- v110
DynamicLibrary
false
- true
- Unicode
v110
-
-
- DynamicLibrary
- false
true
Unicode
- v110
@@ -59,28 +37,16 @@
-
-
-
-
-
-
true
-
- true
-
false
-
- false
-
Level3
@@ -90,21 +56,7 @@
true
-
-
-
-
-
-
- Level3
- Disabled
- WIN32;_DEBUG;%(PreprocessorDefinitions)
- Use
-
-
- true
-
-
+
@@ -115,23 +67,13 @@
true
-
-
-
-
-
-
- Level3
- WIN32;NDEBUG;%(PreprocessorDefinitions)
- Use
-
-
- true
-
-
+
+
+ ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll
+
@@ -144,20 +86,26 @@
+
Create
- Create
Create
- Create
-
-
+
+
+
+
+
+
+ {0c325f5d-e50e-4340-8724-d29896ccc583}
+
+
diff --git a/Examples/Cpp/Examples.Cpp.vcxproj.filters b/Examples/Cpp/Examples.Cpp.vcxproj.filters
index 090f5c1d9..f71c00fe9 100644
--- a/Examples/Cpp/Examples.Cpp.vcxproj.filters
+++ b/Examples/Cpp/Examples.Cpp.vcxproj.filters
@@ -35,16 +35,21 @@
Source Files
+
+ Source Files
+
-
-
- Resource Files
-
+
Resource Files
+
+
+ Resource Files
+
+
\ No newline at end of file
diff --git a/Examples/Cpp/app.ico b/Examples/Cpp/app.ico
index 3a5525fd7..301942f60 100644
Binary files a/Examples/Cpp/app.ico and b/Examples/Cpp/app.ico differ
diff --git a/Examples/VB/Examples.VB.vbproj b/Examples/VB/Examples.VB.vbproj
index 378301045..844e0549e 100644
--- a/Examples/VB/Examples.VB.vbproj
+++ b/Examples/VB/Examples.VB.vbproj
@@ -93,9 +93,9 @@
false
-
+
False
- ..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll
+ ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll
diff --git a/Examples/VB/packages.config b/Examples/VB/packages.config
index 617647af2..5a3253fcb 100644
--- a/Examples/VB/packages.config
+++ b/Examples/VB/packages.config
@@ -1,4 +1,4 @@

-
+
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/BLToolkit.4.JointureAddOn.csproj b/Extensions/JointureAddOn/BLToolkit.4.JointureAddOn.csproj
index 9dbf8b63e..de23570d8 100644
--- a/Extensions/JointureAddOn/BLToolkit.4.JointureAddOn.csproj
+++ b/Extensions/JointureAddOn/BLToolkit.4.JointureAddOn.csproj
@@ -1,73 +1,84 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {9FD2722C-1E6C-4061-8AC0-32EE28808FC0}
- Library
- Properties
- BLToolkit
- BLToolkit.4.JointureAddOn
- v4.0
- 512
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;FW4;OVERRIDETOSTRING;
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- False
- ..\..\Redist\Castle\Castle.Core.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {0C325F5D-E50E-4340-8724-D29896CCC583}
- BLToolkit.4
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {9FD2722C-1E6C-4061-8AC0-32EE28808FC0}
+ Library
+ Properties
+ BLToolkit
+ BLToolkit.4.JointureAddOn
+ v4.0
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;FW4;OVERRIDETOSTRING;
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\packages\Castle.Core.3.2.1\lib\net40-client\Castle.Core.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {0C325F5D-E50E-4340-8724-D29896CCC583}
+ BLToolkit.4
+
+
+
+
+
+
+ -->
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/DataAccess/FullSqlQueryBase.cs b/Extensions/JointureAddOn/DataAccess/FullSqlQuery.cs
similarity index 52%
rename from Extensions/JointureAddOn/DataAccess/FullSqlQueryBase.cs
rename to Extensions/JointureAddOn/DataAccess/FullSqlQuery.cs
index 06d9c7e75..6e4087935 100644
--- a/Extensions/JointureAddOn/DataAccess/FullSqlQueryBase.cs
+++ b/Extensions/JointureAddOn/DataAccess/FullSqlQuery.cs
@@ -1,32 +1,30 @@
+#region
+
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
using System.Text;
using BLToolkit.Aspects;
using BLToolkit.Data;
using BLToolkit.Data.DataProvider;
using BLToolkit.Mapping;
-using BLToolkit.TypeBuilder;
+
+#endregion
namespace BLToolkit.DataAccess
{
- public abstract class FullSqlQueryBase : SqlQueryBase
+ public class FullSqlQuery : SqlQuery
{
- private bool _ignoreLazyLoad;
+ private readonly bool _ignoreLazyLoad;
#region Constructors
- public FullSqlQueryBase(DbManager dbManager)
+ public FullSqlQuery(DbManager dbManager, bool ignoreLazyLoad = false, FactoryType factoryType = FactoryType.LazyLoading)
: base(dbManager)
{
- dbManager.MappingSchema = new FullMappingSchema(false);
- }
+ dbManager.MappingSchema = new FullMappingSchema(dbManager, ignoreLazyLoad, dbManager.MappingSchema, factoryType);
- public FullSqlQueryBase(DbManager dbManager, bool ignoreLazyLoad)
- : base(dbManager)
- {
- dbManager.MappingSchema = new FullMappingSchema(ignoreLazyLoad);
_ignoreLazyLoad = ignoreLazyLoad;
}
@@ -34,6 +32,8 @@ public FullSqlQueryBase(DbManager dbManager, bool ignoreLazyLoad)
#region Overrides
+ private readonly Hashtable _actionSqlQueryInfo = new Hashtable();
+
[NoInterception]
protected override SqlQueryInfo CreateSqlText(DbManager db, Type type, string actionName)
{
@@ -47,76 +47,67 @@ protected override SqlQueryInfo CreateSqlText(DbManager db, Type type, string ac
return base.CreateSqlText(db, type, actionName);
}
}
-
- protected override void AppendTableName(StringBuilder sb, DbManager db, Type type)
- {
- var database = GetDatabaseName(type);
- var owner = GetOwnerName(type);
- var name = base.GetTableName(type);
- db.DataProvider.CreateSqlProvider().BuildTableName(sb,
- database == null ? null : db.DataProvider.Convert(database, ConvertType.NameToDatabase).ToString(),
- owner == null ? null : db.DataProvider.Convert(owner, ConvertType.NameToOwner).ToString(),
- name == null ? null : db.DataProvider.Convert(name, ConvertType.NameToQueryTable).ToString());
-
- //TODO Override OracleSqlProvider in order to avoid this mess...
- string alias = GetTableName(type);
- sb.Append(" " + alias);
- sb.AppendLine();
- }
-
- protected override string GetTableName(Type type)
+ [NoInterception]
+ public override SqlQueryInfo GetSqlQueryInfo(DbManager db, Type type, string actionName)
{
- //bool isSet;
- //return MappingSchema.MetadataProvider.GetTableName(type, Extensions, out isSet);
+ var key = type.FullName + "$" + actionName + "$" + db.DataProvider.UniqueName + "$" + GetTableName(type);
+ var query = (SqlQueryInfo) _actionSqlQueryInfo[key];
- return type.Name;
+ if (query == null)
+ {
+ query = CreateSqlText(db, type, actionName);
+ _actionSqlQueryInfo[key] = query;
+ }
+
+ return query;
}
#endregion
- protected SqlQueryInfo CreateSelectAllFullSqlText(DbManager db, Type type)
+ #region Private methods
+
+ private SqlQueryInfo CreateSelectAllFullSqlText(DbManager db, Type type)
{
var sb = new StringBuilder();
var query = new FullSqlQueryInfo();
sb.Append("SELECT\n");
- int index = 0;
- FullObjectMapper mainMapper = ((FullMappingSchema)db.MappingSchema).GetObjectMapper(type, ref index);
- BuildSelectSQL(mainMapper, sb, db);
+ var mainMapper = (FullObjectMapper) db.MappingSchema.GetObjectMapper(type);
+
+ BuildSelectSql(mainMapper, sb, db);
sb.Remove(sb.Length - 2, 1);
sb.Append("FROM\n\t");
- AppendTableName(sb, db, type);
+ FullAppendTableName(sb, db, type);
- AppendJoinTableName(sb, db, type);
+ AppendJoinTableName(mainMapper, sb, db, type);
query.QueryText = sb.ToString();
return query;
}
- protected SqlQueryInfo CreateSelectFullByKeySqlText(DbManager db, Type type)
+ private SqlQueryInfo CreateSelectFullByKeySqlText(DbManager db, Type type)
{
var sb = new StringBuilder();
var query = new FullSqlQueryInfo();
sb.Append("SELECT\n");
- int index = 0;
- FullObjectMapper mainMapper = ((FullMappingSchema)db.MappingSchema).GetObjectMapper(type, ref index);
- BuildSelectSQL(mainMapper, sb, db);
+ var mainMapper = (FullObjectMapper) db.MappingSchema.GetObjectMapper(type);
+ BuildSelectSql(mainMapper, sb, db);
sb.Remove(sb.Length - 2, 1);
sb.Append("FROM\n\t");
- AppendTableName(sb, db, type);
+ FullAppendTableName(sb, db, type);
- AppendJoinTableName(sb, db, type);
+ AppendJoinTableName(mainMapper, sb, db, type);
AddWherePK(db, query, sb, -1, mainMapper);
@@ -125,89 +116,97 @@ protected SqlQueryInfo CreateSelectFullByKeySqlText(DbManager db, Type type)
return query;
}
- private void BuildSelectSQL(IPropertiesMapping mapper, StringBuilder sb, DbManager db)
+ private void FullAppendTableName(StringBuilder sb, DbManager db, Type type)
{
+ var database = GetDatabaseName(type);
+ var owner = GetOwnerName(type);
+ var name = base.GetTableName(type);
+
+ db.DataProvider.CreateSqlProvider().BuildTableName(sb,
+ database == null ? null : db.DataProvider.Convert(database, ConvertType.NameToDatabase).ToString(),
+ owner == null ? null : db.DataProvider.Convert(owner, ConvertType.NameToOwner).ToString(),
+ name == null ? null : db.DataProvider.Convert(name, ConvertType.NameToQueryTable).ToString());
+
+ //TODO Override OracleSqlProvider in order to avoid this mess...
+ string alias = FullGetTableName(type);
+ sb.Append(" " + "T" /*alias*/);
+ sb.AppendLine();
+ }
+
+ private string FullGetTableName(Type type)
+ {
+ //bool isSet;
+ //return MappingSchema.MetadataProvider.GetTableName(type, Extensions, out isSet);
+
+ return type.Name;
+ }
+
+ private void BuildSelectSql(IObjectMapper mapper, StringBuilder sb, DbManager db, string tableName = "T")
+ {
+ int tableNr = 0;
+
foreach (IMapper mapField in mapper.PropertiesMapping)
{
if (mapField is ValueMapper)
- sb.AppendFormat("\t{0}.{1},\n", ((IObjectMapper)mapper).PropertyType.Name,
- db.DataProvider.Convert(((ValueMapper)mapField).ColumnName, ConvertType.NameToQueryField));
+ sb.AppendFormat("\t{0}.{1} {2},\n"
+ , tableName /* (mapper).PropertyType.Name */,
+ db.DataProvider.Convert(((ValueMapper) mapField).ColumnName, ConvertType.NameToQueryField),
+ ((ValueMapper) mapField).ColumnAlias
+ );
else if (mapField is IPropertiesMapping)
{
- var propertiesMapping = (IPropertiesMapping)mapField;
+ var propertiesMapping = (IPropertiesMapping) mapField;
var cel = propertiesMapping.ParentMapping;
while (cel != null)
{
// To avoid recursion dont take in account types already loaded.
- if (((IMapper)cel).PropertyType == mapField.PropertyType)
+ if (((IMapper) cel).PropertyType == mapField.PropertyType)
continue;
cel = cel.ParentMapping;
}
- var objectMapper = (IObjectMapper)mapField;
- if (!objectMapper.IsLazy)
- BuildSelectSQL(propertiesMapping, sb, db);
+
+ var objectMapper = (IObjectMapper) mapField;
+ if (!objectMapper.IsLazy)
+ BuildSelectSql(objectMapper, sb, db, tableName + tableNr.ToString());
+
+ tableNr++;
}
else
throw new NotImplementedException(mapField.GetType() + " is not yet implemented.");
}
}
- private void AppendJoinTableName(StringBuilder sb, DbManager db, Type type)
+ private void AppendJoinTableName(IPropertiesMapping mapper, StringBuilder sb, DbManager db, Type type, string tableName = "T")
{
- string parentName = GetTableName(type);
+ string parentName = FullGetTableName(type);
+ Dictionary valueMappers = mapper.PropertiesMapping.Where(e => e is ValueMapper).Cast().ToDictionary(e => e.PropertyName, e => e);
- foreach (PropertyInfo prop in type.GetProperties())
- {
- bool isCollection = prop.PropertyType.GetInterfaces().ToList().Contains(typeof(IList));
- Type listElementType = null;
- if (isCollection)
- {
- listElementType = FullMappingSchema.GetGenericType(prop.PropertyType);
- }
+ int tableNr = 0;
- if (!_ignoreLazyLoad)
+ foreach (IMapper mapField in mapper.PropertiesMapping)
+ {
+ var objectMapper = mapField as IObjectMapper;
+ if (objectMapper != null)
{
- object[] lazy = prop.GetCustomAttributes(typeof(LazyInstanceAttribute), true);
- if (lazy.Length > 0)
+ if (!_ignoreLazyLoad)
{
- if (((LazyInstanceAttribute)lazy[0]).IsLazy)
- {
+ if (objectMapper.IsLazy)
continue;
- }
}
- }
- object[] attribs = prop.GetCustomAttributes(typeof(AssociationAttribute), true);
- if (attribs.Length > 0)
- {
- var assocAttrib = (AssociationAttribute)attribs[0];
+ string thisKey = objectMapper.Association.ThisKey[0];
- PropertyInfo parentField = type.GetProperty(assocAttrib.ThisKey);
- PropertyInfo childField = prop.PropertyType.GetProperty(assocAttrib.OtherKey);
- if (isCollection)
- {
- childField = listElementType.GetProperty(assocAttrib.OtherKey);
- //FullMappingSchema.GetColumnFromProperty(listElementType, associationAttribute.OtherKey);
- }
-
- object[] parentFieldAttributes = parentField.GetCustomAttributes(typeof(MapFieldAttribute), true);
- string parentDbField = parentFieldAttributes.Length > 0
- ? ((MapFieldAttribute)parentFieldAttributes[0]).MapName
- : assocAttrib.ThisKey;
-
- object[] childFieldAttributes = childField.GetCustomAttributes(typeof(MapFieldAttribute), true);
- string childDbField = childFieldAttributes.Length > 0
- ? ((MapFieldAttribute)childFieldAttributes[0]).MapName
- : assocAttrib.OtherKey;
+ // TITLE
+ string parentDbField = valueMappers.ContainsKey(thisKey) ? valueMappers[thisKey].ColumnName : thisKey;
+ // ARTIST
+ string childDbField = objectMapper.PropertiesMapping.Where(e => e is ValueMapper).Cast().First(
+ e => e.PropertyName == objectMapper.Association.OtherKey[0]).ColumnName;
- string childDatabase = isCollection
- ? GetDatabaseName(listElementType)
- : GetDatabaseName(prop.PropertyType);
-
- string childOwner = isCollection ? base.GetOwnerName(listElementType) : base.GetOwnerName(prop.PropertyType);
- string childName = isCollection ? base.GetTableName(listElementType) : base.GetTableName(prop.PropertyType);
- string childAlias = isCollection ? GetTableName(listElementType) : GetTableName(prop.PropertyType);
+ string childDatabase = GetDatabaseName(mapField.PropertyType);
+ string childOwner = base.GetOwnerName(mapField.PropertyType);
+ string childName = base.GetTableName(mapField.PropertyType);
+ string childAlias = FullGetTableName(mapField.PropertyType);
StringBuilder childFullName = db.DataProvider.CreateSqlProvider().BuildTableName(
new StringBuilder(),
@@ -221,16 +220,18 @@ private void AppendJoinTableName(StringBuilder sb, DbManager db, Type type)
? null
: db.DataProvider.Convert(childName, ConvertType.NameToQueryTable).ToString());
- sb.AppendFormat("\tINNER JOIN {0} {1} ON {2}.{3}={4}.{5}\n",
+ sb.AppendFormat("\tFULL OUTER JOIN {0} {1} ON {2}.{3}={4}.{5}\n",
childFullName,
- childAlias,
- parentName,
+ tableName + tableNr.ToString() /*childAlias*/,
+ tableName /*parentName*/,
parentDbField,
- childAlias,
+ tableName + tableNr.ToString() /*childAlias*/,
childDbField
);
-
- AppendJoinTableName(sb, db, isCollection ? listElementType : prop.PropertyType);
+
+ AppendJoinTableName((IPropertiesMapping)mapField, sb, db, mapField.PropertyType, tableName + tableNr.ToString());
+
+ tableNr++;
}
}
@@ -252,8 +253,7 @@ private void AppendJoinTableName(StringBuilder sb, DbManager db, Type type)
// ARTIST2.ID_ARTIST = 2566
}
- private void AddWherePK(DbManager db, SqlQueryInfo query, StringBuilder sb, int nParameter,
- FullObjectMapper mapper)
+ private void AddWherePK(DbManager db, SqlQueryInfo query, StringBuilder sb, int nParameter, FullObjectMapper mapper)
{
sb.Append("WHERE\n");
@@ -261,17 +261,18 @@ private void AddWherePK(DbManager db, SqlQueryInfo query, StringBuilder sb, int
{
if (mm is ValueMapper && mm.DataReaderIndex == mapper.DataReaderIndex)
{
- var valueMapper = (ValueMapper)mm;
+ var valueMapper = (ValueMapper) mm;
string tableAlias = mapper.PropertyType.Name;
//mm.Name = ID_TRACK
SqlQueryParameterInfo p = query.AddParameter(
db.DataProvider.Convert(valueMapper.ColumnName + "_W", ConvertType.NameToQueryParameter).
- ToString(),
+ ToString(),
valueMapper.ColumnName);
- sb.AppendFormat("\t{0}.{1} = ", tableAlias, db.DataProvider.Convert(p.FieldName, ConvertType.NameToQueryField));
+ sb.AppendFormat("\t{0}.{1} = ", "T" /* tableAlias */,
+ db.DataProvider.Convert(p.FieldName, ConvertType.NameToQueryField));
if (nParameter < 0)
sb.AppendFormat("{0} AND\n", p.ParameterName);
@@ -282,5 +283,7 @@ private void AddWherePK(DbManager db, SqlQueryInfo query, StringBuilder sb, int
sb.Remove(sb.Length - 5, 5);
}
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/DataAccess/FullSqlQueryT.cs b/Extensions/JointureAddOn/DataAccess/FullSqlQueryT.cs
index 06e3b3720..6f76c3f8c 100644
--- a/Extensions/JointureAddOn/DataAccess/FullSqlQueryT.cs
+++ b/Extensions/JointureAddOn/DataAccess/FullSqlQueryT.cs
@@ -1,585 +1,164 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
-using System.Text;
-using BLToolkit.Aspects;
using BLToolkit.Data;
-using BLToolkit.Data.DataProvider;
-using BLToolkit.Mapping;
-using BLToolkit.TypeBuilder;
namespace BLToolkit.DataAccess
{
- public class FullSqlQuery : SqlQuery
+ public class FullSqlQueryT : FullSqlQuery, ISqlQueryT
{
- private bool _ignoreLazyLoad;
-
#region Constructors
- public FullSqlQuery(DbManager dbManager)
- : base(dbManager)
- {
- dbManager.MappingSchema = new FullMappingSchema(false);
- }
-
- public FullSqlQuery(DbManager dbManager, bool ignoreLazyLoad)
- : base(dbManager)
+ public FullSqlQueryT(DbManager dbManager, bool ignoreLazyLoad = false)
+ : base(dbManager, ignoreLazyLoad)
{
- dbManager.MappingSchema = new FullMappingSchema(ignoreLazyLoad);
- _ignoreLazyLoad = ignoreLazyLoad;
}
#endregion
- #region Overrides
+ #region Implementation of ISqlQueryT
- [NoInterception]
- protected override SqlQueryInfo CreateSqlText(DbManager db, Type type, string actionName)
+ public T SelectByKey(DbManager db, params object[] keys)
{
- switch (actionName)
- {
- case "SelectByKey":
- return CreateSelectFullByKeySqlText(db, type);
- case "SelectAll":
- return CreateSelectAllFullSqlText(db, type);
- default:
- return base.CreateSqlText(db, type, actionName);
- }
+ return (T) base.SelectByKey(db, typeof(T), keys);
}
- #endregion
-
- #region Protected
-
- protected SqlQueryInfo CreateSelectAllFullSqlText(DbManager db, Type type)
+ public T SelectByKey(params object[] keys)
{
- var sb = new StringBuilder();
- var query = new FullSqlQueryInfo();
-
- sb.Append("SELECT\n");
-
- int index = 0;
- FullObjectMapper mainMapper = ((FullMappingSchema) db.MappingSchema).GetObjectMapper(type, ref index);
- BuildSelectSQL(mainMapper, sb, db);
-
- sb.Remove(sb.Length - 2, 1);
-
- sb.Append("FROM\n\t");
-
- FullAppendTableName(sb, db, type);
-
- AppendJoinTableName(sb, db, type);
-
- query.QueryText = sb.ToString();
-
- return query;
+ return (T)base.SelectByKey(typeof(T), keys);
}
- protected SqlQueryInfo CreateSelectFullByKeySqlText(DbManager db, Type type)
+ public List SelectAll(DbManager db)
{
- var sb = new StringBuilder();
- var query = new FullSqlQueryInfo();
-
- sb.Append("SELECT\n");
-
- int index = 0;
- FullObjectMapper mainMapper = ((FullMappingSchema) db.MappingSchema).GetObjectMapper(type, ref index);
- BuildSelectSQL(mainMapper, sb, db);
-
- sb.Remove(sb.Length - 2, 1);
-
- sb.Append("FROM\n\t");
-
- FullAppendTableName(sb, db, type);
-
- AppendJoinTableName(sb, db, type);
-
- AddWherePK(db, query, sb, -1, mainMapper);
-
- query.QueryText = sb.ToString();
-
- return query;
+ return base.SelectAll(db, typeof(T)).Cast().ToList();
}
- protected void FullAppendTableName(StringBuilder sb, DbManager db, Type type)
+ public TL SelectAll(DbManager db, TL list) where TL : IList
{
- var database = GetDatabaseName(type);
- var owner = GetOwnerName(type);
- var name = base.GetTableName(type);
-
- db.DataProvider.CreateSqlProvider().BuildTableName(sb,
- database == null
- ? null
- : db.DataProvider.Convert(database,
- ConvertType.NameToDatabase)
- .ToString(),
- owner == null
- ? null
- : db.DataProvider.Convert(owner,
- ConvertType.NameToOwner).
- ToString(),
- name == null
- ? null
- : db.DataProvider.Convert(name,
- ConvertType.
- NameToQueryTable).
- ToString());
-
- //TODO Override OracleSqlProvider in order to avoid this mess...
- string alias = FullGetTableName(type);
- sb.Append(" " + alias);
- sb.AppendLine();
+ return (TL)base.SelectAll(db, (IList)list, typeof(T));
}
- protected string FullGetTableName(Type type)
+ public TL SelectAll(DbManager db) where TL : IList, new()
{
- //bool isSet;
- //return MappingSchema.MetadataProvider.GetTableName(type, Extensions, out isSet);
-
- return type.Name;
+ return SelectAll(db, new TL());
}
- #endregion
-
- private void BuildSelectSQL(IPropertiesMapping mapper, StringBuilder sb, DbManager db)
+ public List SelectAll()
{
- foreach (IMapper mapField in mapper.PropertiesMapping)
- {
- if (mapField is ValueMapper)
- sb.AppendFormat("\t{0}.{1},\n"
- , ((IObjectMapper)mapper).PropertyType.Name
- ,
- db.DataProvider.Convert(((ValueMapper)mapField).ColumnName,
- ConvertType.NameToQueryField)
- );
- else if (mapField is IPropertiesMapping)
- {
- var propertiesMapping = (IPropertiesMapping)mapField;
- var cel = propertiesMapping.ParentMapping;
- while (cel != null)
- {
- // To avoid recursion dont take in account types already loaded.
- if (((IMapper)cel).PropertyType == mapField.PropertyType)
- continue;
- cel = cel.ParentMapping;
- }
- var objectMapper = (IObjectMapper)mapField;
- if (!objectMapper.IsLazy)
- BuildSelectSQL(propertiesMapping, sb, db);
- }
- else
- throw new NotImplementedException(mapField.GetType() + " is not yet implemented.");
- }
+ return base.SelectAll(typeof(T)).Cast().ToList();
}
- private void AppendJoinTableName(StringBuilder sb, DbManager db, Type type)
+ public TL SelectAll(TL list) where TL : IList
{
- string parentName = FullGetTableName(type);
-
- foreach (PropertyInfo prop in type.GetProperties())
- {
- bool isCollection = prop.PropertyType.GetInterfaces().ToList().Contains(typeof(IList));
- Type listElementType = null;
- if (isCollection)
- {
- listElementType = FullMappingSchema.GetGenericType(prop.PropertyType);
- }
-
- if (!_ignoreLazyLoad)
- {
- object[] lazy = prop.GetCustomAttributes(typeof (LazyInstanceAttribute), true);
- if (lazy.Length > 0)
- {
- if (((LazyInstanceAttribute) lazy[0]).IsLazy)
- {
- continue;
- }
- }
- }
-
- object[] attribs = prop.GetCustomAttributes(typeof(AssociationAttribute), true);
- if (attribs.Length > 0)
- {
- var associationAttribute = (AssociationAttribute)attribs[0];
-
- PropertyInfo parentField = type.GetProperty(associationAttribute.ThisKey);
- PropertyInfo childField = prop.PropertyType.GetProperty(associationAttribute.OtherKey);
- if (isCollection)
- {
- childField = listElementType.GetProperty(associationAttribute.OtherKey);
- //FullMappingSchema.GetColumnFromProperty(listElementType, associationAttribute.OtherKey);
- }
-
- object[] parentFieldAttributes = parentField.GetCustomAttributes(typeof(MapFieldAttribute), true);
- string parentDbField = parentFieldAttributes.Length > 0
- ? ((MapFieldAttribute)parentFieldAttributes[0]).MapName
- : associationAttribute.ThisKey;
-
- object[] childFieldAttributes = childField.GetCustomAttributes(typeof(MapFieldAttribute), true);
- string childDbField = childFieldAttributes.Length > 0
- ? ((MapFieldAttribute)childFieldAttributes[0]).MapName
- : associationAttribute.OtherKey;
-
-
- string childDatabase = isCollection
- ? GetDatabaseName(listElementType)
- : GetDatabaseName(prop.PropertyType);
-
- string childOwner = isCollection ? base.GetOwnerName(listElementType) : base.GetOwnerName(prop.PropertyType);
- string childName = isCollection ? base.GetTableName(listElementType) : base.GetTableName(prop.PropertyType);
- string childAlias = isCollection ? FullGetTableName(listElementType) : FullGetTableName(prop.PropertyType);
-
- StringBuilder childFullName = db.DataProvider.CreateSqlProvider().BuildTableName(
- new StringBuilder(),
- childDatabase == null
- ? null
- : db.DataProvider.Convert(childDatabase, ConvertType.NameToDatabase).ToString(),
- childOwner == null
- ? null
- : db.DataProvider.Convert(childOwner, ConvertType.NameToOwner).ToString(),
- childName == null
- ? null
- : db.DataProvider.Convert(childName, ConvertType.NameToQueryTable).ToString());
-
- sb.AppendFormat("\tINNER JOIN {0} {1} ON {2}.{3}={4}.{5}\n",
- childFullName,
- childAlias,
- parentName,
- parentDbField,
- childAlias,
- childDbField
- );
-
- AppendJoinTableName(sb, db, isCollection ? listElementType : prop.PropertyType);
- }
- }
-
- sb.AppendLine();
-
- //SELECT
- // ARTIST2.ID_ARTIST,
- // ARTIST2.ARTIST,
- // TRACK.ID_TRACK,
- // TRACK.TRACK,
- // TRACK.ID_ARTIST,
- // ARTIST.ID_ARTIST,
- // ARTIST.ARTIST
- //FROM
- // PITAFR01.ARTIST ARTIST2
- // INNER JOIN PITAFR01.TRACK TRACK ON ARTIST2.ID_ARTIST=TRACK.ID_ARTIST
- // INNER JOIN PITAFR01.ARTIST ARTIST ON TRACK.ID_ARTIST=ARTIST.ID_ARTIST
- //WHERE
- // ARTIST2.ID_ARTIST = 2566
+ return SelectAll(DbManager, list);
}
- private void AddWherePK(DbManager db, SqlQueryInfo query, StringBuilder sb, int nParameter,
- FullObjectMapper mapper)
+ public TL SelectAll() where TL : IList, new()
{
- sb.Append("WHERE\n");
-
- foreach (IMapper mm in mapper.PropertiesMapping)
- {
- if (mm is ValueMapper && mm.DataReaderIndex == mapper.DataReaderIndex)
- {
- var valueMapper = (ValueMapper)mm;
-
- string tableAlias = mapper.PropertyType.Name;
-
- //mm.Name = ID_TRACK
- SqlQueryParameterInfo p = query.AddParameter(
- db.DataProvider.Convert(valueMapper.ColumnName + "_W", ConvertType.NameToQueryParameter).
- ToString(),
- valueMapper.ColumnName);
-
- sb.AppendFormat("\t{0}.{1} = ", tableAlias,
- db.DataProvider.Convert(p.FieldName, ConvertType.NameToQueryField));
-
- if (nParameter < 0)
- sb.AppendFormat("{0} AND\n", p.ParameterName);
- else
- sb.AppendFormat("{{{0}}} AND\n", nParameter++);
- }
- }
-
- sb.Remove(sb.Length - 5, 5);
+ return SelectAll(DbManager);
}
- }
-
- public class FullSqlQueryT : SqlQuery
- {
- private bool _ignoreLazyLoad;
-
- #region Constructors
- public FullSqlQueryT(DbManager dbManager)
- : base(dbManager)
+ public int Insert(DbManager db, T obj)
{
- dbManager.MappingSchema = new FullMappingSchema();
+ return base.Insert(db, obj);
}
- public FullSqlQueryT(DbManager dbManager, bool ignoreLazyLoad)
- : base(dbManager)
+ public int Insert(T obj)
{
- dbManager.MappingSchema = new FullMappingSchema(ignoreLazyLoad);
- _ignoreLazyLoad = ignoreLazyLoad;
+ return base.Insert(obj);
}
- #endregion
-
- #region Overrides
-
- [NoInterception]
- protected override SqlQueryInfo CreateSqlText(DbManager db, Type type, string actionName)
+ public int Insert(DbManager db, int maxBatchSize, IEnumerable list)
{
- switch (actionName)
- {
- case "SelectByKey":
- return CreateSelectFullByKeySqlText(db, type);
- case "SelectAll":
- return CreateSelectAllFullSqlText(db, type);
- default:
- return base.CreateSqlText(db, type, actionName);
- }
+ throw new NotImplementedException();
}
- #endregion
-
- #region Protected
-
- protected SqlQueryInfo CreateSelectAllFullSqlText(DbManager db, Type type)
+ public int Insert(int maxBatchSize, IEnumerable list)
{
- var sb = new StringBuilder();
- var query = new FullSqlQueryInfo();
-
- sb.Append("SELECT\n");
-
- int index = 0;
- FullObjectMapper mainMapper = ((FullMappingSchema) db.MappingSchema).GetObjectMapper(type, ref index);
- BuildSelectSQL(mainMapper, sb, db);
-
- sb.Remove(sb.Length - 2, 1);
-
- sb.Append("FROM\n\t");
-
- FullAppendTableName(sb, db, type);
-
- AppendJoinTableName(sb, db, type);
-
- query.QueryText = sb.ToString();
-
- return query;
+ return Insert(DbManager, maxBatchSize, list);
}
- protected SqlQueryInfo CreateSelectFullByKeySqlText(DbManager db, Type type)
+ public int Insert(DbManager db, IEnumerable list)
{
- var sb = new StringBuilder();
- var query = new FullSqlQueryInfo();
-
- sb.Append("SELECT\n");
-
- int index = 0;
- FullObjectMapper mainMapper = ((FullMappingSchema)db.MappingSchema).GetObjectMapper(type, ref index);
- BuildSelectSQL(mainMapper, sb, db);
-
- sb.Remove(sb.Length - 2, 1);
-
- sb.Append("FROM\n\t");
-
- FullAppendTableName(sb, db, type);
-
- AppendJoinTableName(sb, db, type);
-
- AddWherePK(db, query, sb, -1, mainMapper);
+ return Insert(db, int.MaxValue, list);
+ }
- query.QueryText = sb.ToString();
+ public int Insert(IEnumerable list)
+ {
+ return Insert(DbManager, list);
+ }
- return query;
+ public int Update(DbManager db, T obj)
+ {
+ return base.Update(db, obj);
}
- protected void FullAppendTableName(StringBuilder sb, DbManager db, Type type)
+ public int Update(T obj)
{
- var database = GetDatabaseName(type);
- var owner = GetOwnerName(type);
- var name = base.GetTableName(type);
-
- db.DataProvider.CreateSqlProvider().BuildTableName(sb,
- database == null ? null : db.DataProvider.Convert(database, ConvertType.NameToDatabase).ToString(),
- owner == null ? null : db.DataProvider.Convert(owner, ConvertType.NameToOwner).ToString(),
- name == null ? null : db.DataProvider.Convert(name, ConvertType.NameToQueryTable).ToString());
-
- //TODO Override OracleSqlProvider in order to avoid this mess...
- string alias = FullGetTableName(type);
- sb.Append(" " + alias);
- sb.AppendLine();
+ return base.Update(obj);
}
- protected string FullGetTableName(Type type)
+ public int Update(DbManager db, int maxBatchSize, IEnumerable list)
{
- //bool isSet;
- //return MappingSchema.MetadataProvider.GetTableName(type, Extensions, out isSet);
+ throw new NotImplementedException();
+ }
- return type.Name;
+ public int Update(int maxBatchSize, IEnumerable list)
+ {
+ return Update(DbManager, maxBatchSize, list);
}
- #endregion
+ public int Update(DbManager db, IEnumerable list)
+ {
+ return Update(db, int.MaxValue, list);
+ }
- private void BuildSelectSQL(IPropertiesMapping mapper, StringBuilder sb, DbManager db)
+ public int Update(IEnumerable list)
{
- foreach (IMapper mapField in mapper.PropertiesMapping)
- {
- if (mapField is ValueMapper)
- sb.AppendFormat("\t{0}.{1},\n", ((IObjectMapper)mapper).PropertyType.Name,
- db.DataProvider.Convert(((ValueMapper)mapField).ColumnName, ConvertType.NameToQueryField));
- else if (mapField is IPropertiesMapping)
- {
- var propertiesMapping = (IPropertiesMapping)mapField;
- var cel = propertiesMapping.ParentMapping;
- while (cel != null)
- {
- // To avoid recursion dont take in account types already loaded.
- if (((IMapper)cel).PropertyType == mapField.PropertyType)
- continue;
- cel = cel.ParentMapping;
- }
- var objectMapper = (IObjectMapper)mapField;
- if (!objectMapper.IsLazy)
- BuildSelectSQL(propertiesMapping, sb, db);
- }
- else
- throw new NotImplementedException(mapField.GetType() + " is not yet implemented.");
- }
+ return Update(DbManager, list);
}
- private void AppendJoinTableName(StringBuilder sb, DbManager db, Type type)
+ public int DeleteByKey(DbManager db, params object[] key)
{
- string parentName = FullGetTableName(type);
-
- foreach (PropertyInfo prop in type.GetProperties())
- {
- bool isCollection = prop.PropertyType.GetInterfaces().ToList().Contains(typeof (IList));
- Type listElementType = null;
- if (isCollection)
- {
- listElementType = FullMappingSchema.GetGenericType(prop.PropertyType);
- }
-
- if (!_ignoreLazyLoad)
- {
- object[] lazy = prop.GetCustomAttributes(typeof (LazyInstanceAttribute), true);
- if (lazy.Length > 0)
- {
- if (((LazyInstanceAttribute) lazy[0]).IsLazy)
- {
- continue;
- }
- }
- }
-
- object[] attribs = prop.GetCustomAttributes(typeof (AssociationAttribute), true);
- if (attribs.Length > 0)
- {
- var assocAttrib = (AssociationAttribute) attribs[0];
-
- PropertyInfo parentField = type.GetProperty(assocAttrib.ThisKey);
- PropertyInfo childField = prop.PropertyType.GetProperty(assocAttrib.OtherKey);
- if (isCollection)
- {
- childField = listElementType.GetProperty(assocAttrib.OtherKey);
- //FullMappingSchema.GetColumnFromProperty(listElementType, associationAttribute.OtherKey);
- }
-
- object[] parentFieldAttributes = parentField.GetCustomAttributes(typeof (MapFieldAttribute), true);
- string parentDbField = parentFieldAttributes.Length > 0
- ? ((MapFieldAttribute) parentFieldAttributes[0]).MapName
- : assocAttrib.ThisKey;
-
- object[] childFieldAttributes = childField.GetCustomAttributes(typeof (MapFieldAttribute), true);
- string childDbField = childFieldAttributes.Length > 0
- ? ((MapFieldAttribute) childFieldAttributes[0]).MapName
- : assocAttrib.OtherKey;
-
-
- string childDatabase = isCollection
- ? GetDatabaseName(listElementType)
- : GetDatabaseName(prop.PropertyType);
-
- string childOwner = isCollection ? base.GetOwnerName(listElementType) : base.GetOwnerName(prop.PropertyType);
- string childName = isCollection ? base.GetTableName(listElementType) : base.GetTableName(prop.PropertyType);
- string childAlias = isCollection ? FullGetTableName(listElementType) : FullGetTableName(prop.PropertyType);
-
- StringBuilder childFullName = db.DataProvider.CreateSqlProvider().BuildTableName(
- new StringBuilder(),
- childDatabase == null
- ? null
- : db.DataProvider.Convert(childDatabase, ConvertType.NameToDatabase).ToString(),
- childOwner == null
- ? null
- : db.DataProvider.Convert(childOwner, ConvertType.NameToOwner).ToString(),
- childName == null
- ? null
- : db.DataProvider.Convert(childName, ConvertType.NameToQueryTable).ToString());
-
- sb.AppendFormat("\tINNER JOIN {0} {1} ON {2}.{3}={4}.{5}\n",
- childFullName,
- childAlias,
- parentName,
- parentDbField,
- childAlias,
- childDbField
- );
-
- AppendJoinTableName(sb, db, isCollection ? listElementType : prop.PropertyType);
- }
- }
-
- sb.AppendLine();
-
- //SELECT
- // ARTIST2.ID_ARTIST,
- // ARTIST2.ARTIST,
- // TRACK.ID_TRACK,
- // TRACK.TRACK,
- // TRACK.ID_ARTIST,
- // ARTIST.ID_ARTIST,
- // ARTIST.ARTIST
- //FROM
- // PITAFR01.ARTIST ARTIST2
- // INNER JOIN PITAFR01.TRACK TRACK ON ARTIST2.ID_ARTIST=TRACK.ID_ARTIST
- // INNER JOIN PITAFR01.ARTIST ARTIST ON TRACK.ID_ARTIST=ARTIST.ID_ARTIST
- //WHERE
- // ARTIST2.ID_ARTIST = 2566
+ return base.DeleteByKey(db, typeof(T), key);
}
- private void AddWherePK(DbManager db, SqlQueryInfo query, StringBuilder sb, int nParameter,
- FullObjectMapper mapper)
+ public int DeleteByKey(params object[] key)
{
- sb.Append("WHERE\n");
+ return base.DeleteByKey(typeof(T), key);
+ }
- foreach (IMapper mm in mapper.PropertiesMapping)
- {
- if (mm is ValueMapper && mm.DataReaderIndex == mapper.DataReaderIndex)
- {
- var valueMapper = (ValueMapper)mm;
+ public int Delete(DbManager db, T obj)
+ {
+ return base.Delete(db, obj);
+ }
- string tableAlias = mapper.PropertyType.Name;
+ public int Delete(T obj)
+ {
+ return base.Delete(obj);
+ }
- //mm.Name = ID_TRACK
- SqlQueryParameterInfo p = query.AddParameter(
- db.DataProvider.Convert(valueMapper.ColumnName + "_W", ConvertType.NameToQueryParameter).
- ToString(),
- valueMapper.ColumnName);
+ public int Delete(DbManager db, int maxBatchSize, IEnumerable list)
+ {
+ throw new NotImplementedException();
+ }
- sb.AppendFormat("\t{0}.{1} = ", tableAlias, db.DataProvider.Convert(p.FieldName, ConvertType.NameToQueryField));
+ public int Delete(int maxBatchSize, IEnumerable list)
+ {
+ return Delete(DbManager, maxBatchSize, list);
+ }
- if (nParameter < 0)
- sb.AppendFormat("{0} AND\n", p.ParameterName);
- else
- sb.AppendFormat("{{{0}}} AND\n", nParameter++);
- }
- }
+ public int Delete(DbManager db, IEnumerable list)
+ {
+ return Delete(int.MaxValue, list);
+ }
- sb.Remove(sb.Length - 5, 5);
+ public int Delete(IEnumerable list)
+ {
+ return Delete(DbManager, list);
}
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/CollectionFullObjectMapper.cs b/Extensions/JointureAddOn/Mapping/CollectionFullObjectMapper.cs
new file mode 100644
index 000000000..c13b27b1b
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/CollectionFullObjectMapper.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using BLToolkit.Data;
+using BLToolkit.DataAccess;
+using BLToolkit.Emit;
+
+namespace BLToolkit.Mapping
+{
+ public class CollectionFullObjectMapper : TableDescription, IObjectMapper
+ {
+ private readonly DbManager _db;
+ private readonly FactoryType _factoryType;
+
+ public CollectionFullObjectMapper(DbManager db, FactoryType factoryType)
+ {
+ _db = db;
+ _factoryType = factoryType;
+
+ PropertiesMapping = new List();
+ PrimaryKeyValueGetters = new List();
+ PrimaryKeyNames = new List();
+ }
+
+ public Type PropertyCollectionType { get; set; }
+
+ #region IMapper Members
+
+ public int DataReaderIndex { get; set; }
+ public SetHandler Setter { get; set; }
+ public Type PropertyType { get; set; }
+ public string PropertyName { get; set; }
+
+ #endregion
+
+ #region IObjectMapper
+
+ public bool IsLazy { get; set; }
+ public bool ContainsLazyChild { get; set; }
+ public GetHandler Getter { get; set; }
+
+ public List PrimaryKeyValueGetters { get; set; }
+ public Association Association { get; set; }
+
+ public List PrimaryKeyNames { get; set; }
+
+ #endregion
+
+ #region ILazyMapper
+
+ public GetHandler ParentKeyGetter { get; set; }
+
+ #endregion
+
+ public object CreateInstance()
+ {
+ object result = ContainsLazyChild
+ ? (_factoryType == FactoryType.LazyLoading
+ ? TypeFactory.LazyLoading.Create(PropertyType, this, LoadLazy)
+ : TypeFactory.LazyLoadingWithDataBinding.Create(PropertyType, this, LoadLazy))
+ : FunctionFactory.Remote.CreateInstance(PropertyType);
+
+ return result;
+ }
+
+ private object LoadLazy(IMapper mapper, object proxy, Type parentType)
+ {
+ var lazyMapper = (ILazyMapper) mapper;
+ object key = lazyMapper.ParentKeyGetter(proxy);
+
+ var fullSqlQuery = new FullSqlQuery(_db, true);
+ object parentLoadFull = fullSqlQuery.SelectByKey(parentType, key);
+ if (parentLoadFull == null)
+ {
+ object value = Activator.CreateInstance(mapper is CollectionFullObjectMapper
+ ? (mapper as CollectionFullObjectMapper).PropertyCollectionType
+ : mapper.PropertyType);
+ return value;
+ }
+
+ var objectMapper = (IObjectMapper) mapper;
+ return objectMapper.Getter(parentLoadFull);
+ }
+
+ #region IPropertiesMapping Members
+
+ public List PropertiesMapping { get; private set; }
+ public IPropertiesMapping ParentMapping { get; set; }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/DataBindingMappingSchema.cs b/Extensions/JointureAddOn/Mapping/DataBindingMappingSchema.cs
new file mode 100644
index 000000000..95fca5f8d
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/DataBindingMappingSchema.cs
@@ -0,0 +1,33 @@
+using System;
+using BLToolkit.Data;
+
+namespace BLToolkit.Mapping
+{
+ public class DataBindingMappingSchema : MappingSchema
+ {
+ protected override ObjectMapper CreateObjectMapperInstance(Type type)
+ {
+ var res = new DataBindingObjectMapper(type);
+
+ return res;
+ }
+ }
+
+ public class FullDataBindingMappingSchema : FullMappingSchema
+ {
+ private readonly DbManager _db;
+ private readonly bool _ignoreLazyLoad;
+
+ public FullDataBindingMappingSchema(DbManager db, bool ignoreLazyLoad = false, MappingSchema parentMappingSchema = null)
+ : base(db, ignoreLazyLoad, parentMappingSchema, FactoryType.LazyLoadingWithDataBinding)
+ {
+ _db = db;
+ _ignoreLazyLoad = ignoreLazyLoad;
+ }
+
+ protected override ObjectMapper CreateObjectMapperInstance(Type type)
+ {
+ return new FullDataBindingObjectMapper(_db, _ignoreLazyLoad);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/DataBindingObjectMapper.cs b/Extensions/JointureAddOn/Mapping/DataBindingObjectMapper.cs
new file mode 100644
index 000000000..96963a481
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/DataBindingObjectMapper.cs
@@ -0,0 +1,46 @@
+#region
+
+using System;
+using BLToolkit.Data;
+using BLToolkit.Reflection;
+
+#endregion
+
+namespace BLToolkit.Mapping
+{
+ public class DataBindingObjectMapper : ObjectMapper
+ {
+ private readonly Type _type;
+
+ public DataBindingObjectMapper(Type type)
+ {
+ _type = type;
+ }
+
+ public override object CreateInstance()
+ {
+ return TypeFactory.DataBindingFactory.Create(_type);
+ }
+
+ public override object CreateInstance(InitContext context)
+ {
+ return CreateInstance();
+ }
+ }
+
+ public class FullDataBindingObjectMapper : FullObjectMapper
+ {
+ public FullDataBindingObjectMapper(DbManager db, bool ignoreLazyLoading) : base(db, ignoreLazyLoading, FactoryType.LazyLoadingWithDataBinding)
+ {
+ }
+
+ public override object CreateInstance()
+ {
+ object result = ContainsLazyChild
+ ? TypeFactory.LazyLoadingWithDataBinding.Create(PropertyType, this, LoadLazy)
+ : base.CreateInstance();
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/FactoryType.cs b/Extensions/JointureAddOn/Mapping/FactoryType.cs
new file mode 100644
index 000000000..ced1c02a3
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/FactoryType.cs
@@ -0,0 +1,8 @@
+namespace BLToolkit.Mapping
+{
+ public enum FactoryType
+ {
+ LazyLoading,
+ LazyLoadingWithDataBinding,
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/FullMappingSchema.cs b/Extensions/JointureAddOn/Mapping/FullMappingSchema.cs
index 017e2b37a..86c372eb3 100644
--- a/Extensions/JointureAddOn/Mapping/FullMappingSchema.cs
+++ b/Extensions/JointureAddOn/Mapping/FullMappingSchema.cs
@@ -1,474 +1,306 @@
-/**********************************************************************************************
- * To make a new version of the mapping, I have to set virtual the method
- * MapDataReaderToObject (l.2177 in MappingSchema.cs).
- *
- *
- * *********************************************/
+#region
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
-using System.Reflection;
using BLToolkit.Data;
-using BLToolkit.DataAccess;
-using BLToolkit.Emit;
-using BLToolkit.Reflection;
-using BLToolkit.TypeBuilder;
-using Castle.DynamicProxy;
+using BLToolkit.Reflection.Extension;
+
+#endregion
namespace BLToolkit.Mapping
{
public class FullMappingSchema : MappingSchema
{
- #region Private members
-
- private static readonly object _setterHandlersLock = new object();
-
- private static readonly Dictionary> _settersHandlers =
- new Dictionary>();
-
- private static readonly Dictionary> _gettersHandlers =
- new Dictionary>();
-
- private readonly ProxyGenerator Proxy = new ProxyGenerator();
+ #region Fields
- private readonly Dictionary _mappers = new Dictionary();
+ private readonly DbManager _db;
+ private readonly bool _ignoreLazyLoad;
+ private DataTable _schema;
+ private List _schemaColumns;
+ private readonly MappingSchema _parentMappingSchema;
+ private readonly FactoryType _factoryType;
- private bool _ignoreLazyLoad;
+ private ExtensionList _extensions;
#endregion
- public FullMappingSchema(bool ignoreLazyLoad)
+ public FullMappingSchema(DbManager db, bool ignoreLazyLoad = false, MappingSchema parentMappingSchema = null,
+ FactoryType factoryType = FactoryType.LazyLoading)
{
+ _db = db;
+ _parentMappingSchema = parentMappingSchema;
+ _factoryType = factoryType;
_ignoreLazyLoad = ignoreLazyLoad;
}
- public FullMappingSchema()
- : this(false)
+ #region Overrides
+
+ public override ExtensionList Extensions
{
+ get
+ {
+ if (_parentMappingSchema != null)
+ return this._parentMappingSchema.Extensions;
+ return _extensions;
+ }
+ set
+ {
+ if (_parentMappingSchema != null)
+ this._parentMappingSchema.Extensions = value;
+ _extensions = value;
+ }
}
- #region Overrides
+ protected override ObjectMapper CreateObjectMapperInstance(Type type)
+ {
+ return new FullObjectMapper(_db, _ignoreLazyLoad,_factoryType);
+ }
- public override object MapDataReaderToObject(
- IDataReader dataReader,
- Type destObjectType,
- params object[] parameters)
+ protected override void MapInternal(Reflection.InitContext initContext, IMapDataSource source, object sourceObject, IMapDataDestination dest, object destObject, params object[] parameters)
{
- // Get mapping for the type
- if (destObjectType == null) throw new ArgumentNullException("type");
+ FullObjectMapper mapper = (FullObjectMapper)initContext.ObjectMapper;
+ IDataReader dataReader = (IDataReader)sourceObject;
+
+ //int[] index = GetIndex(source, dest);
+ //IValueMapper[] mappers = GetValueMappers(source, dest, index);
+
+ //foreach (var valueMapper in mappers)
+ //{
+
+ //}
- if (dataReader.FieldCount == 0)
- return null;
+ InitSchema(dataReader);
- int index = 0;
- FullObjectMapper mapper = GetObjectMapper(destObjectType, ref index);
if (mapper.ColParent)
{
- object result = FillObject(mapper, dataReader);
+ FillObject(mapper, dataReader, destObject);
while (dataReader.Read())
{
- result = FillObject(result, mapper, dataReader);
+ destObject = FillObject(destObject, mapper, dataReader);
}
-
- return result;
}
else
- return FillObject(mapper, dataReader);
+ FillObject(mapper, dataReader, destObject);
}
-
- public override IList MapDataReaderToList(
+ public override IList MapDataReaderToList(
IDataReader reader,
- IList list,
+ IList list,
+ Type destObjectType,
params object[] parameters)
{
- FullObjectMapper mapper;
- if (_mappers.ContainsKey(typeof (T)))
- {
- mapper = _mappers[typeof (T)];
- }
- else
- {
- int index = 0;
- mapper = GetObjectMapper(typeof (T), ref index);
- _mappers[typeof (T)] = mapper;
- }
-
- while (reader.Read())
- {
- var result = FillObject(mapper, reader);
- list.Add(result);
- }
-
- return list;
+ return internalMapDataReaderToList(reader, list, destObjectType, parameters);
}
#endregion
- private T FillObject(FullObjectMapper mapper, IDataReader datareader)
- {
- T result = mapper.ContainsLazyChild
- ? (T) Proxy.CreateClassProxy(typeof (T), new LazyValueLoadInterceptor(mapper, LoadLazy))
- : FunctionFactory.Remote.CreateInstance();
+ #region Private methods
+ private object FillObject(object result, IObjectMapper mapper, IDataReader datareader)
+ {
foreach (IMapper map in mapper.PropertiesMapping)
{
if (map is IObjectMapper && (map as IObjectMapper).IsLazy)
continue;
-
- if (!(map.DataReaderIndex < datareader.FieldCount))
- continue;
-
- if (!datareader.IsDBNull(map.DataReaderIndex))
+
+ if (map is CollectionFullObjectMapper)
{
- if (map is ValueMapper)
- {
- object value = datareader.GetValue(map.DataReaderIndex);
- map.Setter(result, value);
- }
- else if (map is FullObjectMapper)
+ var collectionFullObjectMapper = (CollectionFullObjectMapper) map;
+ object listInstance = collectionFullObjectMapper.Getter(result);
+ if (listInstance == null)
{
- object fillObject = FillObject((FullObjectMapper) map, datareader);
- map.Setter(result, fillObject);
+ listInstance = Activator.CreateInstance((map as CollectionFullObjectMapper).PropertyCollectionType);
+ map.Setter(result, listInstance);
}
- if (map is CollectionFullObjectMapper)
- {
- object collectionInstance =
- Activator.CreateInstance((map as CollectionFullObjectMapper).PropertyCollectionType);
- map.Setter(result, collectionInstance);
- object fillObject = FillObject((CollectionFullObjectMapper) map, datareader);
- ((IList) collectionInstance).Add(fillObject);
- }
- }
- }
+ var list = (IList) listInstance;
+ object fillObject = ((CollectionFullObjectMapper)map).CreateInstance();
+ FillObject((CollectionFullObjectMapper) map, datareader, fillObject);
- return result;
- }
+ if (list.Count > 0)
+ {
+ var curMapper = (FullObjectMapper)GetObjectMapper(fillObject.GetType());
- private object LoadLazy(IMapper mapper, object proxy, Type parentType)
- {
- var lazyMapper = (ILazyMapper)mapper;
- object key = lazyMapper.ParentKeyGetter(proxy);
-
- using (var db = new DbManager())
- {
- var fullSqlQuery = new FullSqlQuery(db, true);
- object parentLoadFull = fullSqlQuery.SelectByKey(parentType, key);
- if (parentLoadFull == null)
- {
- object value = Activator.CreateInstance(mapper is CollectionFullObjectMapper
- ? (mapper as CollectionFullObjectMapper).PropertyCollectionType
- : mapper.PropertyType);
- return value;
- }
+ object lastElement = list[list.Count - 1];
- var objectMapper = (IObjectMapper) mapper;
- return objectMapper.Getter(parentLoadFull);
- }
- }
+ bool allPksEqual = true;
- private object FillObject(object result, IObjectMapper mapper, IDataReader datareader)
- {
- foreach (IMapper map in mapper.PropertiesMapping)
- {
- if (map is IObjectMapper && (map as IObjectMapper).IsLazy)
- continue;
-
- if (!datareader.IsDBNull(map.DataReaderIndex))
- {
- ////IGNORE. TODO Add getter
- //if (map is ValueMapper)
- //{
- // //Type propType = (map as ValueMapper).PropertyType;
- // object value = datareader.GetValue(map.DataReaderIndex);
- // //if (value != null && value.GetType() != propType)
- // //{
- // // value = ConvertChangeType(value, propType);
- // //}
- // map.Setter(result, value);
- //}
-
- ////IGNORE. TODO Add getter
- //if (map is FullObjectMapper)
- //{
- // object fillObject = FillObject((FullObjectMapper)map, datareader);
- // map.Setter(result, fillObject);
- //}
- if (map is CollectionFullObjectMapper)
- {
- var collectionFullObjectMapper = (CollectionFullObjectMapper) map;
- object listInstance = collectionFullObjectMapper.Getter(result);
- if (listInstance == null)
+ //This is needed, because DBValue can be Null, but the Field can be Guid, wich then is filled with Guid.Empty and this is also a valid value!
+ /*foreach (var pkIndex in pkIndexes)
+ {
+ var dbValue = reader.GetValue(pkIndex);
+ if (dbValue == DBNull.Value)
+ {
+ pkIsNull = true;
+ break;
+ }
+ }*/
+
+ foreach (var pkGetter in curMapper.PrimaryKeyValueGetters)
{
- listInstance =
- Activator.CreateInstance((map as CollectionFullObjectMapper).PropertyCollectionType);
- map.Setter(result, listInstance);
+ object lastPk = pkGetter.Invoke(lastElement);
+ object currentPk = pkGetter.Invoke(fillObject);
+
+ if (!lastPk.Equals(currentPk))
+ {
+ allPksEqual = false;
+ break;
+ }
}
- object fillObject = FillObject((CollectionFullObjectMapper) map, datareader);
- ((IList) listInstance).Add(fillObject);
+
+ if (allPksEqual)
+ continue;
}
+
+ ((IList) listInstance).Add(fillObject);
}
}
return result;
}
- private object FillObject(IObjectMapper mapper, IDataReader datareader)
+ private void FillObject(IObjectMapper mapper, IDataReader datareader, object result)
{
- object result = mapper.ContainsLazyChild
- ? Proxy.CreateClassProxy(mapper.PropertyType, new LazyValueLoadInterceptor(mapper, LoadLazy))
- : FunctionFactory.Remote.CreateInstance(mapper.PropertyType);
-
foreach (IMapper map in mapper.PropertiesMapping)
{
if (map is IObjectMapper && (map as IObjectMapper).IsLazy)
continue;
- if (!(map.DataReaderIndex < datareader.FieldCount))
+ if (map is ValueMapper)
+ {
+ if (((ValueMapper)map).SetDataReaderIndex(_schemaColumns))
+ continue;
+ }
+
+ if (datareader.IsDBNull(map.DataReaderIndex))
continue;
- if (!datareader.IsDBNull(map.DataReaderIndex))
+ if (map is ValueMapper)
{
- if (map is ValueMapper)
+ object value = datareader.GetValue(map.DataReaderIndex);
+
+ try
{
- //Type propType = (map as ValueMapper).PropertyType;
- object value = datareader.GetValue(map.DataReaderIndex);
- //if (value != null && value.GetType() != propType)
- //{
- // value = ConvertChangeType(value, propType);
- //}
map.Setter(result, value);
}
-
- if (map is FullObjectMapper)
+ catch (Exception exception)
{
- object fillObject = FillObject((FullObjectMapper) map, datareader);
- map.Setter(result, fillObject);
+ throw new Exception(
+ string.Format("FillOject failed for field : {0} of class: {1}.\nColumn name : {2} Db type is: {3} and value : {4}",
+ map.PropertyName, mapper.PropertyType,
+ ((ValueMapper) map).ColumnName,
+ value == null ? "Null" : value.GetType().ToString(), value), exception);
}
+ }
- if (map is CollectionFullObjectMapper)
- {
- var collectionFullObjectMapper = (CollectionFullObjectMapper) map;
+ if (map is FullObjectMapper)
+ {
+ object fillObject = ((FullObjectMapper) map).CreateInstance();
+ FillObject((FullObjectMapper) map, datareader, fillObject);
+ map.Setter(result, fillObject);
+ }
- object listInstance = collectionFullObjectMapper.Getter(result);
- if (listInstance == null)
- {
- listInstance =
- Activator.CreateInstance((map as CollectionFullObjectMapper).PropertyCollectionType);
- map.Setter(result, listInstance);
- }
- object fillObject = FillObject((CollectionFullObjectMapper) map, datareader);
- ((IList) listInstance).Add(fillObject);
+ if (map is CollectionFullObjectMapper)
+ {
+ var collectionFullObjectMapper = (CollectionFullObjectMapper) map;
+
+ object listInstance = collectionFullObjectMapper.Getter(result);
+ if (listInstance == null)
+ {
+ listInstance = Activator.CreateInstance((map as CollectionFullObjectMapper).PropertyCollectionType);
+ map.Setter(result, listInstance);
}
+
+ object fillObject = ((CollectionFullObjectMapper)map).CreateInstance();
+ FillObject((CollectionFullObjectMapper) map, datareader, fillObject);
+ ((IList) listInstance).Add(fillObject);
}
}
-
- return result;
}
- public FullObjectMapper GetObjectMapper(Type mapperType, ref int startIndex)
+ private void InitSchema(IDataReader reader)
{
- var mapper = new FullObjectMapper {PropertyType = mapperType};
- return (FullObjectMapper) GetObjectMapper(mapper, ref startIndex);
+ _schemaColumns = new List();
+ _schema = reader.GetSchemaTable();
+ if (_schema != null)
+ _schema.Rows.Cast().ToList().ForEach(dr => _schemaColumns.Add((string)dr["ColumnName"]));
}
- public IMapper GetObjectMapper(IObjectMapper mapper, ref int startIndex)
+ private IList internalMapDataReaderToList(
+ IDataReader reader,
+ IList list,
+ Type destObjectType,
+ params object[] parameters)
{
- Type mapperType = mapper.PropertyType;
- var objectMappers = new List();
- TableDescription tableDescription = GetTableDescription(mapperType);
+ FullObjectMapper mapper = (FullObjectMapper)GetObjectMapper(destObjectType);
- lock (_setterHandlersLock)
- {
- if (!_settersHandlers.ContainsKey(mapperType))
- _settersHandlers.Add(mapperType, new Dictionary());
+ InitSchema(reader);
- if (!_gettersHandlers.ContainsKey(mapperType))
- _gettersHandlers.Add(mapperType, new Dictionary());
- }
+ object currentItem = null;
- PropertyInfo[] properties = mapperType.GetProperties();
+ List pkIndexes = new List();
+ foreach (var nm in mapper.PrimaryKeyNames)
+ {
+ pkIndexes.Add(mapper.PropertiesMapping.First(x => x.PropertyName == nm).DataReaderIndex);
+ }
- PropertyInfo primaryKeyPropInfo = null;
- foreach (PropertyInfo prop in properties)
+ while (reader.Read())
{
- // Setters
- lock (_setterHandlersLock)
- {
- if (!_settersHandlers[mapper.PropertyType].ContainsKey(prop.Name))
- {
- SetHandler setHandler = FunctionFactory.Il.CreateSetHandler(mapper.PropertyType, prop);
- _settersHandlers[mapper.PropertyType].Add(prop.Name, setHandler /* IL.Setter*/);
- }
- }
+ var result = mapper.CreateInstance();
- object[] pkFields = prop.GetCustomAttributes(typeof(PrimaryKeyAttribute), true);
- if (pkFields.Length > 0)
+ FillObject(mapper, reader, result);
+ if (currentItem == null)
{
- primaryKeyPropInfo = prop;
+ currentItem = result;
+ list.Add(result);
+ continue;
}
- }
- foreach (PropertyInfo prop in properties)
- {
- bool isLazy = false;
- if (!_ignoreLazyLoad)
+
+ bool pkIsNull = false;
+ bool allPksEqual = true;
+
+ //This is needed, because DBValue can be Null, but the Field can be Guid, wich then is filled with Guid.Empty and this is also a valid value!
+ foreach (var pkIndex in pkIndexes)
{
- object[] lazy = prop.GetCustomAttributes(typeof (LazyInstanceAttribute), true);
- if (lazy.Length > 0)
+ var dbValue = reader.GetValue(pkIndex);
+ if (dbValue == DBNull.Value)
{
- if (((LazyInstanceAttribute) lazy[0]).IsLazy)
- {
- isLazy = true;
- mapper.ContainsLazyChild = true;
-
- // Getters
- lock (_setterHandlersLock)
- if (!_gettersHandlers[mapperType].ContainsKey(primaryKeyPropInfo.Name))
- {
- GetHandler getHandler = FunctionFactory.Il.CreateGetHandler(mapperType,
- primaryKeyPropInfo);
- _gettersHandlers[mapperType].Add(primaryKeyPropInfo.Name, getHandler);
- }
- }
+ pkIsNull = true;
+ break;
}
}
- // Check if the accessor is an association
- object[] associationAttr = prop.GetCustomAttributes(typeof (AssociationAttribute), true);
- if (associationAttr.Length > 0)
- {
- if (associationAttr.Length > 1)
- throw new Exception("AssociationAttribute is used several times on the property " + prop.Name);
- var ass = (AssociationAttribute) associationAttr[0];
+ if (!pkIsNull)
+ foreach (var pkGetter in mapper.PrimaryKeyValueGetters)
+ {
+ object resultPk = pkGetter.Invoke(result);
+ object currentItemPk = pkGetter.Invoke(currentItem);
- // Getters for IObjectMapper
- lock (_setterHandlersLock)
- if (!_gettersHandlers[mapperType].ContainsKey(prop.Name))
+ if (!resultPk.Equals(currentItemPk))
{
- GetHandler getHandler = FunctionFactory.Il.CreateGetHandler(mapperType, prop);
- _gettersHandlers[mapperType].Add(prop.Name, getHandler);
+ allPksEqual = false;
+ break;
}
-
- bool isCollection = prop.PropertyType.GetInterfaces().ToList().Contains(typeof (IList));
- IObjectMapper propertiesMapping;
- if (!isCollection)
- {
- propertiesMapping = new FullObjectMapper
- {
- PropertyType = prop.PropertyType,
- IsNullable = ass.CanBeNull
- };
- }
- else
- {
- Type listElementType = GetGenericType(prop.PropertyType);
- TableDescription colElementTableDescription = GetTableDescription(listElementType);
-
- propertiesMapping = new CollectionFullObjectMapper
- {
- PropertyType = listElementType,
- Getter = _gettersHandlers[mapperType][prop.Name],
- TableName = colElementTableDescription.TableName,
- PropertyCollectionType = prop.PropertyType,
- };
-
- (mapper as FullObjectMapper).ColParent = true;
}
- propertiesMapping.PropertyName = prop.Name;
- propertiesMapping.IsLazy = isLazy;
- propertiesMapping.Setter = _settersHandlers[mapperType][prop.Name];
-
- if (propertiesMapping.IsLazy)
- {
- propertiesMapping.ParentKeyGetter = _gettersHandlers[mapperType][primaryKeyPropInfo.Name];
- }
- objectMappers.Add(propertiesMapping);
- }
- else
+ if (!pkIsNull && !allPksEqual)
{
- object[] nomapAttr = prop.GetCustomAttributes(typeof (NoMapAttribute), true);
- if (nomapAttr.Length > 0)
- continue;
-
-
- object[] mapFields = prop.GetCustomAttributes(typeof (MapFieldAttribute), true);
- if (mapFields.Length > 1)
- throw new Exception("AssociationAttribute is used several times on the property " + prop.Name);
-
-
- var map = new ValueMapper
- {
- PropertyName = prop.Name,
- PropertyType = prop.PropertyType,
- DataReaderIndex = startIndex,
- Setter = _settersHandlers[mapperType][prop.Name],
- TableName = tableDescription.TableName,
- /* Optimize with Provider.BuildTableName */
- ColumnName =
- mapFields.Length > 0 ? ((MapFieldAttribute) mapFields[0]).MapName : prop.Name
- };
-
- mapper.PropertiesMapping.Add(map);
-
- object[] pkFields = prop.GetCustomAttributes(typeof (PrimaryKeyAttribute), true);
- if (pkFields.Length > 1)
- throw new Exception("PrimaryKeyAttribute is used several times on the property " + prop.Name);
-
- if (pkFields.Length == 1)
- mapper.DataReaderIndex = startIndex;
-
- startIndex++;
+ currentItem = result;
+ list.Add(result);
+ //continue;
}
- }
- foreach (IObjectMapper objMap in objectMappers)
- {
- IObjectMapper cel = mapper;
- while (cel != null)
+ if (mapper.ColParent)
{
- if (mapper.PropertyType == objMap.PropertyType)
- continue;
-
- cel = (IObjectMapper) cel.ParentMapping;
+ FillObject(currentItem, mapper, reader);
}
-
- objMap.ParentMapping = mapper;
- mapper.PropertiesMapping.Add(GetObjectMapper(objMap, ref startIndex));
- //TODO startIndex++ ??? If we dont show the association column, dont increase the index
}
- return mapper;
- }
-
- public static Type GetGenericType(Type t)
- {
- if (t.IsGenericType)
- {
- Type[] at = t.GetGenericArguments();
- return at.FirstOrDefault();
- }
- return null;
+ return list;
}
- private TableDescription GetTableDescription(Type type)
- {
- var tableDescription = new TableDescription();
- object[] tableAtt = type.GetCustomAttributes(typeof (TableNameAttribute), true);
-
- if (tableAtt.Length > 0)
- {
- var tna = (TableNameAttribute) tableAtt[0];
-
- tableDescription.Database = tna.Database;
- tableDescription.Owner = tna.Owner;
- tableDescription.TableName = tna.Name;
- }
-
- return tableDescription;
- }
+ #endregion
}
}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/FullObjectMapper.cs b/Extensions/JointureAddOn/Mapping/FullObjectMapper.cs
index 8f1c97774..53d1eebf2 100644
--- a/Extensions/JointureAddOn/Mapping/FullObjectMapper.cs
+++ b/Extensions/JointureAddOn/Mapping/FullObjectMapper.cs
@@ -1,57 +1,58 @@
-using System;
+#region
+
+using System;
+using System.Collections;
using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using BLToolkit.Data;
+using BLToolkit.DataAccess;
using BLToolkit.Emit;
+using BLToolkit.Reflection;
+using BLToolkit.Reflection.Extension;
+
+#endregion
namespace BLToolkit.Mapping
{
- public interface IMapper
+ public class FullObjectMapper : ObjectMapper, IObjectMapper
{
- int DataReaderIndex { get; set; }
- SetHandler Setter { get; set; }
- Type PropertyType { get; set; }
- string PropertyName { get; set; }
- }
+ #region Fields
- public class OwnerDescription
- {
- public string Database { get; set; }
- public string Owner { get; set; }
- }
+ private static readonly object SetterHandlersLock = new object();
- public class TableDescription : OwnerDescription
- {
- public string TableName { get; set; }
- }
+ private static readonly Dictionary> SettersHandlers =
+ new Dictionary>();
- public class ValueMapper : TableDescription, IMapper
- {
- public string ColumnName { get; set; }
+ private static readonly Dictionary> GettersHandlers =
+ new Dictionary>();
- #region IMapper Members
-
- public int DataReaderIndex { get; set; }
- public SetHandler Setter { get; set; }
- public Type PropertyType { get; set; }
- public string PropertyName { get; set; }
+ private readonly DbManager _db;
+ private readonly FactoryType _factoryType;
+ private readonly bool _ignoreLazyLoad;
#endregion
- }
- public class CollectionFullObjectMapper : TableDescription, IObjectMapper
- {
- public CollectionFullObjectMapper()
+ public FullObjectMapper(DbManager db, bool ignoreLazyLoading, FactoryType factoryType)
{
+ _db = db;
+ _ignoreLazyLoad = ignoreLazyLoading;
+ _factoryType = factoryType;
+
PropertiesMapping = new List();
+ PrimaryKeyValueGetters = new List();
+ PrimaryKeyNames = new List();
}
#region IPropertiesMapping Members
public List PropertiesMapping { get; private set; }
- public IPropertiesMapping ParentMapping { get; set;}
+ public IPropertiesMapping ParentMapping { get; set; }
#endregion
- public Type PropertyCollectionType { get; set; }
+ public bool IsNullable { get; set; }
+ public bool ColParent { get; set; }
#region IMapper Members
@@ -59,6 +60,7 @@ public CollectionFullObjectMapper()
public SetHandler Setter { get; set; }
public Type PropertyType { get; set; }
public string PropertyName { get; set; }
+ public Association Association { get; set; }
#endregion
@@ -68,70 +70,284 @@ public CollectionFullObjectMapper()
public bool ContainsLazyChild { get; set; }
public GetHandler Getter { get; set; }
+ public List PrimaryKeyNames { get; set; }
+
#endregion
#region ILazyMapper
public GetHandler ParentKeyGetter { get; set; }
+ public List PrimaryKeyValueGetters { get; set; }
#endregion
- }
- public interface ILazyMapper
- {
- GetHandler ParentKeyGetter { get; set; }
- }
+ #region Overrides
- public interface IObjectMapper : IPropertiesMapping, IMapper, ILazyMapper
- {
- bool IsLazy { get; set; }
- bool ContainsLazyChild { get; set; }
- GetHandler Getter { get; set; }
- }
+ public override void Init(MappingSchema mappingSchema, Type type)
+ {
+ PropertyType = type;
- public interface IPropertiesMapping
- {
- List PropertiesMapping { get; }
- IPropertiesMapping ParentMapping { get; set; }
- }
+ // TODO implement this method
+ base.Init(mappingSchema, type);
- public class FullObjectMapper : ObjectMapper, IObjectMapper
- {
- public FullObjectMapper()
- {
- PropertiesMapping = new List();
+ int startIndex = 0;
+ GetObjectMapper(this, ref startIndex, _typeAccessor);
}
- #region IPropertiesMapping Members
+ public override object CreateInstance()
+ {
+ object result = ContainsLazyChild
+ ? (_factoryType == FactoryType.LazyLoading
+ ? TypeFactory.LazyLoading.Create(PropertyType, this, LoadLazy)
+ : TypeFactory.LazyLoadingWithDataBinding.Create(PropertyType, this, LoadLazy))
+ : FunctionFactory.Remote.CreateInstance(PropertyType);
- public List PropertiesMapping { get; private set; }
- public IPropertiesMapping ParentMapping { get; set; }
+ return result;
+ }
- #endregion
+ public override object CreateInstance(InitContext context)
+ {
+ return CreateInstance();
+ }
- public bool IsNullable { get; set; }
- public bool ColParent { get; set; }
+ #endregion
- #region IMapper Members
+ #region Private methods
- public int DataReaderIndex { get; set; }
- public SetHandler Setter { get; set; }
- public Type PropertyType { get; set; }
- public string PropertyName { get; set; }
+ private TableDescription GetTableDescription(Type type)
+ {
+ var tableDescription = new TableDescription();
+ object[] tableAtt = type.GetCustomAttributes(typeof (TableNameAttribute), true);
- #endregion
+ if (tableAtt.Length > 0)
+ {
+ var tna = (TableNameAttribute) tableAtt[0];
- #region IObjectMapper
+ tableDescription.Database = tna.Database;
+ tableDescription.Owner = tna.Owner;
+ tableDescription.TableName = tna.Name;
+ }
- public bool IsLazy { get; set; }
- public bool ContainsLazyChild { get; set; }
- public GetHandler Getter { get; set; }
+ return tableDescription;
+ }
- #endregion
+ private IMapper GetObjectMapper(IObjectMapper mapper, ref int startIndex, TypeAccessor akTypeAccessor)
+ {
+ //Todo: Remove this Call!
+ _extension = TypeExtension.GetTypeExtension(mapper.PropertyType /*_typeAccessor.OriginalType*/, MappingSchema.Extensions);
+
+ Type mapperType = mapper.PropertyType;
+ var objectMappers = new List();
+
+ TableDescription tableDescription = GetTableDescription(mapperType);
+
+ lock (SetterHandlersLock)
+ {
+ if (!SettersHandlers.ContainsKey(mapperType))
+ SettersHandlers.Add(mapperType, new Dictionary());
+
+ if (!GettersHandlers.ContainsKey(mapperType))
+ GettersHandlers.Add(mapperType, new Dictionary());
+ }
+
+ PropertyInfo[] properties = mapperType.GetProperties();
+
+ MemberAccessor primaryKeyMemberAccessor = null;
+ foreach (MemberAccessor ma in akTypeAccessor)
+ {
+ // Setters
+ lock (SetterHandlersLock)
+ {
+ if (!SettersHandlers[mapper.PropertyType].ContainsKey(ma.Name))
+ {
+ SettersHandlers[mapper.PropertyType].Add(ma.Name, ma.SetValue);
+ }
+ }
+
+ if (GetPrimaryKey(ma) != null)
+ {
+ primaryKeyMemberAccessor = ma;
+
+ lock (SetterHandlersLock)
+ {
+ if (!GettersHandlers[mapperType].ContainsKey(ma.Name))
+ {
+ GettersHandlers[mapperType].Add(ma.Name, ma.GetValue);
+ }
+ }
+ mapper.PrimaryKeyValueGetters.Add(GettersHandlers[mapperType][ma.Name]);
+ mapper.PrimaryKeyNames.Add(ma.Name);
+
+ if (mapper.Association != null && (mapper.Association.OtherKey == null || mapper.Association.OtherKey.Length == 0))
+ {
+ mapper.Association.OtherKey = new[] {ma.Name};
+ }
+ }
+ }
+ if (primaryKeyMemberAccessor == null)
+ throw new Exception("PrimaryKey attribute not found on type: " + mapperType);
+
+ foreach (PropertyInfo prop in properties)
+ {
+ var ma = akTypeAccessor.First(x => x.Name == prop.Name);
+
+ // Check if the accessor is an association
+ var association = GetAssociation(ma);
+ if (association != null)
+ {
+ // Getters for IObjectMapper
+ lock (SetterHandlersLock)
+ if (!GettersHandlers[mapperType].ContainsKey(prop.Name))
+ {
+ GettersHandlers[mapperType].Add(prop.Name, ma.GetValue);
+ }
+
+ bool isCollection = prop.PropertyType.GetInterfaces().ToList().Contains(typeof (IList));
+ IObjectMapper propertiesMapping;
+ if (!isCollection)
+ {
+ // TODO Generate this instance using the CreateObjectMapperInstance method of fullMappingSchema
+ // _db.MappingSchema.CreateObjectMapperInstance(prop.PropertyType)
+
+ propertiesMapping = new FullObjectMapper(_db, _ignoreLazyLoad, _factoryType)
+ {
+ PropertyType = prop.PropertyType,
+ IsNullable = association.CanBeNull,
+ Getter = GettersHandlers[mapperType][prop.Name],
+ };
+ }
+ else
+ {
+ Type listElementType = GetGenericType(prop.PropertyType);
+ TableDescription colElementTableDescription = GetTableDescription(listElementType);
+
+ // TODO Generate this instance using the CreateObjectMapperInstance method of fullMappingSchema
+ propertiesMapping = new CollectionFullObjectMapper(_db, _factoryType)
+ {
+ PropertyType = listElementType,
+ Getter = GettersHandlers[mapperType][prop.Name],
+ TableName = colElementTableDescription.TableName,
+ PropertyCollectionType = prop.PropertyType,
+ };
+
+ if (mapper is FullObjectMapper)
+ ((FullObjectMapper) mapper).ColParent = true;
+ }
+
+ if (association.ThisKey == null || association.ThisKey.Length == 0)
+ association.ThisKey = new[] {primaryKeyMemberAccessor.Name};
+
+ bool isLazy = false;
+ if (!_ignoreLazyLoad)
+ {
+ var lazy = GetLazyInstance(ma); // prop.GetCustomAttributes(typeof(LazyInstanceAttribute), true);
+ if (lazy)
+ {
+ isLazy = true;
+ mapper.ContainsLazyChild = true;
+
+ // Getters
+ lock (SetterHandlersLock)
+ if (!GettersHandlers[mapperType].ContainsKey(primaryKeyMemberAccessor.Name))
+ {
+ GettersHandlers[mapperType].Add(primaryKeyMemberAccessor.Name, primaryKeyMemberAccessor.GetValue);
+ }
+ }
+ }
+
+ propertiesMapping.Association = association;
+ propertiesMapping.PropertyName = prop.Name;
+ propertiesMapping.IsLazy = isLazy;
+ propertiesMapping.Setter = SettersHandlers[mapperType][prop.Name];
+
+ if (propertiesMapping.IsLazy)
+ {
+ propertiesMapping.ParentKeyGetter = GettersHandlers[mapperType][primaryKeyMemberAccessor.Name];
+ }
+ objectMappers.Add(propertiesMapping);
+ }
+ else
+ {
+ var mapIgnore = GetMapIgnore(ma);
+ if (mapIgnore)
+ continue;
+
+ var mapField = GetMapField(ma);
+ string columnName = mapField != null ? mapField.MapName : prop.Name;
+
+ var map = new ValueMapper
+ {
+ PropertyName = prop.Name,
+ PropertyType = prop.PropertyType,
+ DataReaderIndex = startIndex,
+ Setter = SettersHandlers[mapperType][prop.Name],
+ TableName = tableDescription.TableName,
+ ColumnName = columnName,
+ };
+
+ var mapColumnName = map.GetColumnName(columnName);
+ map.ColumnAlias = columnName == mapColumnName ? null : mapColumnName;
+
+ mapper.PropertiesMapping.Add(map);
+
+ var pkField = GetPrimaryKey(ma);
+ if (pkField != null)
+ mapper.DataReaderIndex = startIndex;
+
+ startIndex++;
+ }
+ }
+
+ foreach (IObjectMapper objMap in objectMappers)
+ {
+ #region Check mapping recursion
+
+ IObjectMapper cel = mapper;
+ while (cel != null)
+ {
+ if (mapper.PropertyType == objMap.PropertyType)
+ continue;
+
+ cel = (IObjectMapper) cel.ParentMapping;
+ }
+
+ #endregion
+
+ objMap.ParentMapping = mapper;
+ mapper.PropertiesMapping.Add(GetObjectMapper(objMap, ref startIndex, MappingSchema.GetObjectMapper(objMap.PropertyType).TypeAccessor));
+ }
+
+ return mapper;
+ }
- #region ILazyMapper
+ protected object LoadLazy(IMapper mapper, object proxy, Type parentType)
+ {
+ var lazyMapper = (ILazyMapper) mapper;
+ object key = lazyMapper.ParentKeyGetter(proxy);
+
+ var fullSqlQuery = new FullSqlQuery(_db, ignoreLazyLoad: true);
+ object parentLoadFull = fullSqlQuery.SelectByKey(parentType, key);
+ if (parentLoadFull == null)
+ {
+ object value = Activator.CreateInstance(mapper is CollectionFullObjectMapper
+ ? (mapper as CollectionFullObjectMapper).PropertyCollectionType
+ : mapper.PropertyType);
+ return value;
+ }
+
+ var objectMapper = (IObjectMapper) mapper;
+ return objectMapper.Getter(parentLoadFull);
+ }
- public GetHandler ParentKeyGetter { get; set; }
+ private static Type GetGenericType(Type t)
+ {
+ if (t.IsGenericType)
+ {
+ Type[] at = t.GetGenericArguments();
+ return at.FirstOrDefault();
+ }
+ return null;
+ }
#endregion
}
diff --git a/Extensions/JointureAddOn/Mapping/ILazyMapper.cs b/Extensions/JointureAddOn/Mapping/ILazyMapper.cs
new file mode 100644
index 000000000..25bc73483
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/ILazyMapper.cs
@@ -0,0 +1,9 @@
+using BLToolkit.Emit;
+
+namespace BLToolkit.Mapping
+{
+ public interface ILazyMapper
+ {
+ GetHandler ParentKeyGetter { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/IMapper.cs b/Extensions/JointureAddOn/Mapping/IMapper.cs
new file mode 100644
index 000000000..41386d5b4
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/IMapper.cs
@@ -0,0 +1,13 @@
+using System;
+using BLToolkit.Emit;
+
+namespace BLToolkit.Mapping
+{
+ public interface IMapper
+ {
+ int DataReaderIndex { get; set; }
+ SetHandler Setter { get; set; }
+ Type PropertyType { get; set; }
+ string PropertyName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/IObjectMapper.cs b/Extensions/JointureAddOn/Mapping/IObjectMapper.cs
new file mode 100644
index 000000000..0d781e87b
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/IObjectMapper.cs
@@ -0,0 +1,23 @@
+
+using System.Collections.Generic;
+using BLToolkit.Emit;
+
+namespace BLToolkit.Mapping
+{
+ public interface IObjectMapper : IPropertiesMapping, IMapper, ILazyMapper
+ {
+ bool IsLazy { get; set; }
+
+ bool ContainsLazyChild { get; set; }
+
+ List PrimaryKeyNames { get; set; }
+
+ ///
+ /// Is set only for CollectionFullObjectMapper. TODO : Should refactor this?
+ ///
+ GetHandler Getter { get; set; }
+
+ List PrimaryKeyValueGetters { get; set; }
+ Association Association { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/IPropertiesMapping.cs b/Extensions/JointureAddOn/Mapping/IPropertiesMapping.cs
new file mode 100644
index 000000000..709e17800
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/IPropertiesMapping.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+
+namespace BLToolkit.Mapping
+{
+ public interface IPropertiesMapping
+ {
+ List PropertiesMapping { get; }
+ IPropertiesMapping ParentMapping { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/LazyValueLoadInterceptor.cs b/Extensions/JointureAddOn/Mapping/LazyValueLoadInterceptor.cs
index 6ce8673cc..024884851 100644
--- a/Extensions/JointureAddOn/Mapping/LazyValueLoadInterceptor.cs
+++ b/Extensions/JointureAddOn/Mapping/LazyValueLoadInterceptor.cs
@@ -1,5 +1,4 @@
using System;
-using BLToolkit.Aspects;
using Castle.DynamicProxy;
using IInterceptor = Castle.DynamicProxy.IInterceptor;
@@ -7,8 +6,13 @@ namespace BLToolkit.Mapping
{
public class LazyValueLoadInterceptor : IInterceptor
{
+ #region Fields
+
private readonly IObjectMapper _mapper;
private readonly Func _lazyLoader;
+ private bool _intercepted;
+
+ #endregion
public LazyValueLoadInterceptor(IObjectMapper mapper, Func lazyLoader)
{
@@ -16,25 +20,19 @@ public LazyValueLoadInterceptor(IObjectMapper mapper, Func lazyLoader)
+ {
+ return ProxyGenerator.CreateClassProxy(type, new LazyValueLoadInterceptor(mapper, lazyLoader));
+ }
+ }
+
+ public static class LazyLoadingWithDataBinding
+ {
+ public static object Create(Type type, IObjectMapper mapper, Func lazyLoader)
+ {
+ return ProxyGenerator.CreateClassProxy(type, new[]
+ {
+ typeof (INotifyPropertyChanged),
+ typeof (DataBindingFactory.IMarkerInterface)
+ }, new LazyValueLoadInterceptor(mapper, lazyLoader), new NotifyPropertyChangedInterceptor(type.FullName));
+ }
+ }
+
+ public static class DataBindingFactory
+ {
+ public static object Create(Type type)
+ {
+ return ProxyGenerator.CreateClassProxy(type, new[]
+ {
+ typeof (INotifyPropertyChanged),
+ typeof (IMarkerInterface)
+ }, new NotifyPropertyChangedInterceptor(type.FullName));
+ }
+
+ public interface IMarkerInterface
+ {
+ string TypeName { get; }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Mapping/ValueMapper.cs b/Extensions/JointureAddOn/Mapping/ValueMapper.cs
new file mode 100644
index 000000000..46ebaf3ba
--- /dev/null
+++ b/Extensions/JointureAddOn/Mapping/ValueMapper.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using BLToolkit.Emit;
+
+namespace BLToolkit.Mapping
+{
+ public class ValueMapper : TableDescription, IMapper
+ {
+ private readonly Dictionary> _columnVariations = new Dictionary>();
+ private readonly Dictionary _columnOccurences = new Dictionary();
+
+ public string ColumnAlias { get; set; }
+ public string ColumnName { get; set; }
+
+ #region IMapper Members
+
+ public int DataReaderIndex { get; set; }
+ public SetHandler Setter { get; set; }
+ public Type PropertyType { get; set; }
+ public string PropertyName { get; set; }
+
+ #endregion
+
+ public string GetColumnName(string columnName)
+ {
+ int occurenceCount;
+ if (_columnOccurences.ContainsKey(columnName))
+ {
+ occurenceCount = _columnOccurences[columnName] + 1;
+ _columnOccurences[columnName] = occurenceCount;
+ }
+ else
+ {
+ _columnOccurences[columnName] = 1;
+ occurenceCount = 1;
+ }
+
+ string res = columnName + (occurenceCount > 1 ? string.Format("_{0}", occurenceCount - 1) : "");
+
+ var variations = new List();
+ if (_columnVariations.ContainsKey(columnName))
+ {
+ variations = _columnVariations[columnName];
+ }
+
+ variations.Add(res);
+ _columnVariations[columnName] = variations;
+
+ return res;
+ }
+
+ public bool SetDataReaderIndex(List schemaColumns)
+ {
+ string colName = ColumnName;
+ int index = -1;
+ if (!schemaColumns.Contains(colName))
+ {
+ bool found = false;
+ int order = 1;
+ foreach (string key in _columnVariations.Keys)
+ {
+ List variations = _columnVariations[key];
+ if (variations.Contains(colName))
+ {
+ if (colName.Contains(key + "_"))
+ {
+ string orderString = colName.Replace(key + "_", "");
+ order = int.Parse(orderString) + 1;
+ colName = key;
+ found = true;
+ break;
+ }
+ }
+ }
+ if (found)
+ {
+ int i = 0, occurenceCnt = 0;
+ foreach (string column in schemaColumns)
+ {
+ if (column == colName)
+ {
+ occurenceCnt++;
+ if (occurenceCnt == order)
+ {
+ index = i;
+ break;
+ }
+ }
+ i++;
+ }
+ }
+ else
+ {
+ // TODO Check this condition...
+ //if (!_ignoreMissingColumns)
+ //{
+ // throw new Exception(string.Format("Couldnt find db column {0} in the query result", colName));
+ //}
+ return true;
+ }
+ }
+ else
+ index = schemaColumns.IndexOf(colName);
+
+ DataReaderIndex = index;
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Extensions/JointureAddOn/Properties/AssemblyInfo.cs b/Extensions/JointureAddOn/Properties/AssemblyInfo.cs
index cf3ce759a..ccf9afe61 100644
--- a/Extensions/JointureAddOn/Properties/AssemblyInfo.cs
+++ b/Extensions/JointureAddOn/Properties/AssemblyInfo.cs
@@ -1,17 +1,14 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using BLToolkit;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("BLToolkit.4.JointureAddOn")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("BLToolkit.4.JointureAddOn")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[assembly: AssemblyTrademark("")]
+[assembly: AssemblyTitle(BLToolkitConstants.ProductName + " JointureAddOn")]
+[assembly: AssemblyDescription(BLToolkitConstants.ProductDescription + " JointureAddOn")]
+[assembly: AssemblyProduct(BLToolkitConstants.ProductName + " JointureAddOn")]
+[assembly: AssemblyCopyright(BLToolkitConstants.Copyright)]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
@@ -32,5 +29,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion(BLToolkitConstants.FullVersionString)]
+[assembly: AssemblyFileVersion(BLToolkitConstants.FullVersionString)]
diff --git a/Extensions/JointureAddOn/Reflection/FullInitContext.cs b/Extensions/JointureAddOn/Reflection/FullInitContext.cs
deleted file mode 100644
index 7de393862..000000000
--- a/Extensions/JointureAddOn/Reflection/FullInitContext.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-using BLToolkit.Mapping;
-
-namespace BLToolkit.Reflection
-{
- public class FullInitContext
- {
- public object[] MemberParameters { get; set; }
- public object[] Parameters { get; set; }
- public bool IsInternal { get; set; }
- public bool IsLazyInstance { get; set; }
- public object Parent { get; set; }
- public object SourceObject { get; set; }
- public FullObjectMapper ObjectMapper { get; set; }
- public MappingSchema MappingSchema { get; set; }
- public bool IsSource { get; set; }
- public bool StopMapping { get; set; }
- public IMapDataSource DataSource { get; set; }
-
- private Dictionary