SPRNET-1246: Show DI for NHibernate managed objects in NHibernate example application

This commit is contained in:
lahma
2009-12-26 20:19:39 +00:00
parent 69cc934cfe
commit 3dc13bec2f
27 changed files with 335 additions and 118 deletions

View File

@@ -64,6 +64,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.20
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.Tests", "test\Spring\Spring.Template.Velocity.Tests\Spring.Template.Velocity.Tests.csproj", "{10405837-CB67-40D8-9326-84C9383983E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate30.2008", "src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.2008.csproj", "{009247FE-CBAD-40FF-ADC3-D7F28B270071}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate30.Tests.2008", "test\Spring\Spring.Data.NHibernate30.Tests\Spring.Data.NHibernate30.Tests.2008.csproj", "{E4CCB8A2-2381-41D1-B44C-E20E13703056}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate21.Integration.Tests.2008", "test\Spring\Spring.Data.NHibernate21.Integration.Tests\Spring.Data.NHibernate21.Integration.Tests.2008.csproj", "{4A07E150-ED90-407C-8CAD-4760444DDFD9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -374,6 +380,36 @@ Global
{10405837-CB67-40D8-9326-84C9383983E2}.Release|Any CPU.Build.0 = Release|Any CPU
{10405837-CB67-40D8-9326-84C9383983E2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{10405837-CB67-40D8-9326-84C9383983E2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|.NET.ActiveCfg = Debug|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Any CPU.Build.0 = Debug|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|.NET.ActiveCfg = Release|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|Any CPU.ActiveCfg = Release|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|Any CPU.Build.0 = Release|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|.NET.ActiveCfg = Debug|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|.NET.ActiveCfg = Release|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|Any CPU.Build.0 = Release|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Debug|.NET.ActiveCfg = Debug|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Release|.NET.ActiveCfg = Release|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Release|Any CPU.Build.0 = Release|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4A07E150-ED90-407C-8CAD-4760444DDFD9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -25,12 +25,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Integratio
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aspects", "src\Spring.Aspects\Spring.Aspects.csproj", "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.2005", "..\..\..\src\Spring\Spring.Core\Spring.Core.2005.csproj", "{710961A3-0DF4-49E4-A26E-F5B9C044AC84}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
@@ -55,13 +49,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.2005", "..\..\.
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate.2005", "..\..\..\src\Spring\Spring.Data.NHibernate\Spring.Data.NHibernate.2005.csproj", "{130E1609-45A7-4F65-B112-105F2DD3E2CE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Web.2005", "..\..\..\src\Spring\Spring.Web\Spring.Web.2005.csproj", "{BA4789EB-281A-48EA-8763-28B9F0596A18}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Web.2005", "..\..\..\src\Spring\Spring.Web\Spring.Web.2005.csproj", "{BA4789EB-281A-48EA-8763-28B9F0596A18}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate21.2005", "..\..\..\src\Spring\Spring.Data.NHibernate21\Spring.Data.NHibernate21.2005.csproj", "{E57B4652-0231-49CB-B058-87E10EFE540D}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
@@ -117,16 +111,6 @@ Global
{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Any CPU.Build.0 = Release|Any CPU
{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|.NET.ActiveCfg = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|.NET.ActiveCfg = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.Build.0 = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|.NET.ActiveCfg = Debug|Any CPU
{710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -157,16 +141,6 @@ Global
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Any CPU.Build.0 = Release|Any CPU
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Debug|.NET.ActiveCfg = Debug|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Release|.NET.ActiveCfg = Release|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Release|Any CPU.Build.0 = Release|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{130E1609-45A7-4F65-B112-105F2DD3E2CE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|.NET.ActiveCfg = Debug|Any CPU
{BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -177,6 +151,16 @@ Global
{BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Any CPU.Build.0 = Release|Any CPU
{BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Debug|.NET.ActiveCfg = Debug|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Release|.NET.ActiveCfg = Release|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Release|Any CPU.Build.0 = Release|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E57B4652-0231-49CB-B058-87E10EFE540D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -18,7 +18,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\...\Spring.Northwind.Web
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "17866"
VWDPort = "8642"
DefaultWebSiteLanguage = "Visual C#"
EndProjectSection
EndProject
@@ -46,12 +46,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Integratio
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aspects", "src\Spring.Aspects\Spring.Aspects.csproj", "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Web.References.Debug", "src\Spring.Northwind.Web.References\Spring.Northwind.Web.References.Debug.csproj", "{FD89FEBE-4914-45F3-9123-B2CB954810DD}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
@@ -94,6 +88,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate12.20
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aop.2005", "..\..\..\src\Spring\Spring.Aop\Spring.Aop.2005.csproj", "{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -154,16 +154,6 @@ Global
{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Any CPU.Build.0 = Release|Any CPU
{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|.NET.ActiveCfg = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|.NET.ActiveCfg = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.Build.0 = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|.NET.ActiveCfg = Debug|Any CPU
{FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -234,6 +224,16 @@ Global
{90F2D070-6F98-4926-A626-BD7A6071D6D9}.Release|Any CPU.Build.0 = Release|Any CPU
{90F2D070-6F98-4926-A626-BD7A6071D6D9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{90F2D070-6F98-4926-A626-BD7A6071D6D9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|.NET.ActiveCfg = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|.NET.ActiveCfg = Release|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Any CPU.Build.0 = Release|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -19,7 +19,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Spring.Northwind.Web", "src
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "1135"
VWDPort = "8158"
DefaultWebSiteLanguage = "Visual C#"
EndProjectSection
EndProject

View File

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "L:\...\Spring.Northwind.Web\", "src\Spring.Northwind.Web\", "{3E321CBC-75B0-45C4-AFEF-7CEED28368AE}"
ProjectSection(WebsiteProperties) = preProject
ProjectReferences = "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}|Spring.Aspects.dll;{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}|Spring.Northwind.Dao.dll;{6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}|Spring.Northwind.Dao.NHibernate.dll;{9E15876F-E9E0-43B7-9874-B54F163757D6}|Spring.Northwind.Service.dll;{FD89FEBE-4914-45F3-9123-B2CB954810DD}|Spring.Northwind.Web.References.dll;"
ProjectReferences = "{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}|Spring.Northwind.Dao.dll;{6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}|Spring.Northwind.Dao.NHibernate.dll;{9E15876F-E9E0-43B7-9874-B54F163757D6}|Spring.Northwind.Service.dll;{FD89FEBE-4914-45F3-9123-B2CB954810DD}|Spring.Northwind.Web.References.dll;"
Debug.AspNetCompiler.VirtualPath = "/Spring.Northwind.Web"
Debug.AspNetCompiler.PhysicalPath = "src\Spring.Northwind.Web\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Spring.Northwind.Web\"

View File

@@ -18,7 +18,7 @@
connectionString="Data Source=|DataDirectory|Northwind.db;Version=3;FailIfMissing=True;"/>
<!-- NHibernate Configuration -->
<object id="NHibernateSessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21">
<object id="NHibernateSessionFactory" type="Spring.Northwind.Dao.NHibernate.CustomLocalSessionFactoryObject, Spring.Northwind.Dao.NHibernate">
<property name="DbProvider" ref="DbProvider"/>
<property name="MappingAssemblies">
<list>
@@ -30,13 +30,13 @@
<entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<entry key="dialect" value="NHibernate.Dialect.SQLiteDialect"/>
<entry key="connection.driver_class" value="NHibernate.Driver.SQLite20Driver"/>
<entry key="use_proxy_validator" value="false" />
</dictionary>
</property>
<!-- provides integation with Spring's declarative transaction management features -->
<property name="ExposeTransactionAwareSessionFactory" value="true" />
</object>
<!-- Transaction Management Strategy - local database transactions -->
@@ -60,5 +60,13 @@
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
</object>
<object id="CustomerClassificationCalculator" type="Spring.Northwind.Domain.DefaultCustomerClassificationCalculator, Spring.Northwind.Dao">
</object>
<object id="CustomerEntityProtoType" type="Spring.Northwind.Domain.Customer, Spring.Northwind.Dao" singleton="false">
<constructor-arg ref="CustomerClassificationCalculator" />
</object>
</objects>

View File

@@ -0,0 +1,23 @@
using NHibernate.Bytecode;
using Spring.Data.NHibernate;
using Spring.Data.NHibernate.Bytecode;
namespace Spring.Northwind.Dao.NHibernate
{
/// <summary>
/// A custom version of <see cref="LocalSessionFactoryObject" /> that sets
/// bytecode provider to be Spring.NET's <see cref="BytecodeProvider" />.
/// </summary>
public class CustomLocalSessionFactoryObject : LocalSessionFactoryObject
{
/// <summary>
/// Overwritten to return Spring's bytecode provider for entity injection to work.
/// </summary>
public override IBytecodeProvider BytecodeProvider
{
get { return new BytecodeProvider(ApplicationContext); }
set { }
}
}
}

View File

@@ -1,41 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Spring.Northwind.Domain.Customer, Spring.Northwind.Dao" table="Customers" lazy="false">
<id name="Id" type="String" unsaved-value="null">
<class name="Spring.Northwind.Domain.Customer, Spring.Northwind.Dao" table="Customers" lazy="false" proxy="Spring.Northwind.Domain.ICustomer, Spring.Northwind.Dao">
<id name="Id" unsaved-value="null">
<column name="CustomerID" length="5" sql-type="nchar" not-null="true" unique="true" index="PK_Customers"/>
<generator class="assigned" />
</id>
<property name="CompanyName" type="String">
<property name="CompanyName">
<column name="CompanyName" length="40" sql-type="nvarchar" not-null="true" index="CompanyName"/>
</property>
<property name="ContactName" type="String">
<property name="ContactName">
<column name="ContactName" length="30" sql-type="nvarchar" not-null="false"/>
</property>
<property name="ContactTitle" type="String">
<property name="ContactTitle">
<column name="ContactTitle" length="30" sql-type="nvarchar" not-null="false"/>
</property>
<property name="Address" type="String">
<property name="Address">
<column name="Address" length="60" sql-type="nvarchar" not-null="false"/>
</property>
<property name="City" type="String">
<property name="City">
<column name="City" length="15" sql-type="nvarchar" not-null="false" index="City"/>
</property>
<property name="Region" type="String">
<property name="Region">
<column name="Region" length="15" sql-type="nvarchar" not-null="false" index="Region"/>
</property>
<property name="PostalCode" type="String">
<property name="PostalCode">
<column name="PostalCode" length="10" sql-type="nvarchar" not-null="false" index="PostalCode"/>
</property>
<property name="Country" type="String">
<column name="Country" length="15" sql-type="nvarchar" not-null="false"/>
</property>
<property name="Phone" type="String">
<property name="Phone">
<column name="Phone" length="24" sql-type="nvarchar" not-null="false"/>
</property>
<property name="Fax" type="String">
<property name="Fax">
<column name="Fax" length="24" sql-type="nvarchar" not-null="false"/>
</property>
<bag name="Orders" inverse="true" lazy="true" cascade="all">
<bag name="Orders" inverse="true" lazy="true" cascade="all" access="field.camelcase">
<key column="CustomerID"/>
<one-to-many class="Spring.Northwind.Domain.Order, Spring.Northwind.Dao"/>
</bag>

View File

@@ -38,7 +38,7 @@
<column name="ShipCountry" length="15" sql-type="nvarchar" not-null="false"/>
</property>
<bag name="OrderDetails" inverse="true" lazy="true" cascade="all">
<bag name="OrderDetails" inverse="true" lazy="true" cascade="all" access="field.camelcase">
<key column="OrderID"/>
<one-to-many class="Spring.Northwind.Domain.OrderDetail, Spring.Northwind.Dao"/>
</bag>

View File

@@ -33,9 +33,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging">
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll</HintPath>
<HintPath>..\..\..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections">
<SpecificVersion>False</SpecificVersion>
@@ -67,6 +67,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Dao\NHibernate\CustomLocalSessionFactoryObject.cs" />
<Compile Include="Dao\NHibernate\HibernateCustomerDao.cs">
<SubType>Code</SubType>
</Compile>

View File

@@ -28,9 +28,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll</HintPath>
<HintPath>..\..\..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -66,6 +66,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Dao\NHibernate\CustomLocalSessionFactoryObject.cs" />
<Compile Include="Dao\NHibernate\HibernateCustomerDao.cs">
<SubType>Code</SubType>
</Compile>

View File

@@ -18,11 +18,16 @@
#endregion
using System.Collections;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Spring.Northwind.Domain
{
public class Customer
/// <summary>
/// Customer entity. We
/// </summary>
public class Customer : ICustomer
{
#region Fields
@@ -37,8 +42,11 @@ namespace Spring.Northwind.Domain
protected string country;
protected string phone;
protected string fax;
protected IList orders;
protected IList<Order> orders;
// our calculator that is injected by Spring
private readonly ICustomerClassificationCalculator calculator;
#endregion
#region Properties
@@ -109,25 +117,30 @@ namespace Spring.Northwind.Domain
set { fax = value; }
}
public IList Orders
public ReadOnlyCollection<Order> Orders
{
get
{
if (orders == null)
{
orders = new ArrayList();
}
return orders;
return new ReadOnlyCollection<Order>(orders ?? new List<Order>(0));
}
set { orders = value; }
}
public string Classification
{
get { return calculator.CalculateClassification(this); }
}
#endregion
#region Constructor (s)
public Customer()
public Customer(ICustomerClassificationCalculator calculator)
{
if (calculator == null)
{
throw new ArgumentNullException("calculator", "Calculator cannot be null");
}
this.calculator = calculator;
}
public Customer(string companyName, string contactName, string contactTitle, string address, string city,

View File

@@ -0,0 +1,47 @@
using System;
namespace Spring.Northwind.Domain
{
/// <summary>
/// Basic (dummy) implementation of customer classification calculation.
/// </summary>
/// <remarks>
/// In real life we would need to check orders, their total and the actual
/// reveneu that this customer brings us..
/// </remarks>
public class DefaultCustomerClassificationCalculator : ICustomerClassificationCalculator
{
public string CalculateClassification(Customer customer)
{
if (customer == null)
{
return null;
}
// we calculate based on customer's A alphabet cout (of course)
int aCount = 0;
foreach (char c in customer.CompanyName)
{
if (Char.ToLowerInvariant(c) == 'a')
{
aCount++;
}
}
if (aCount > 4)
{
// great customer!
return "A";
}
if (aCount > 1)
{
// ok..
return "B";
}
// a really lousy customer...
return "C";
}
}
}

View File

@@ -0,0 +1,24 @@
using System.Collections.ObjectModel;
namespace Spring.Northwind.Domain
{
/// <summary>
/// Interface for customer entity data.
/// </summary>
public interface ICustomer
{
string Id { get; }
string CompanyName { get; set; }
string ContactName { get; set; }
string ContactTitle { get; set; }
string Address { get; set; }
string City { get; set; }
string Region { get; set; }
string PostalCode { get; set; }
string Country { get; set; }
string Phone { get; set; }
string Fax { get; set; }
ReadOnlyCollection<Order> Orders { get; }
string Classification { get; }
}
}

View File

@@ -0,0 +1,14 @@
namespace Spring.Northwind.Domain
{
public interface ICustomerClassificationCalculator
{
/// <summary>
/// Calculates the classification of customer (the value of customer to our company).
/// </summary>
/// <param name="customer">
/// Customer to base calculation on.
/// </param>
/// <returns>Human readable classifcation indicator for given customer.</returns>
string CalculateClassification(Customer customer);
}
}

View File

@@ -19,7 +19,8 @@
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Spring.Northwind.Domain
{
@@ -42,7 +43,9 @@ namespace Spring.Northwind.Domain
//protected Employee _employee;
//protected Shipper _shipVia;
protected IList orderDetails;
protected IList<OrderDetail> orderDetails;
protected ICustomerClassificationCalculator calculator;
#endregion
@@ -54,7 +57,7 @@ namespace Spring.Northwind.Domain
public Order(DateTime orderDate, DateTime requiredDate, DateTime shippedDate, decimal freight, string shipName,
string shipAddress, string shipCity, string shipRegion, string shipPostalCode, string shipCountry,
Customer customer)
Customer customer, ICustomerClassificationCalculator calculator)
{
this.orderDate = orderDate;
this.requiredDate = requiredDate;
@@ -67,6 +70,7 @@ namespace Spring.Northwind.Domain
this.shipPostalCode = shipPostalCode;
this.shipCountry = shipCountry;
this.customer = customer;
this.calculator = calculator;
}
#endregion
@@ -146,18 +150,9 @@ namespace Spring.Northwind.Domain
set { customer = value; }
}
public IList OrderDetails
public ReadOnlyCollection<OrderDetail> OrderDetails
{
get
{
if(orderDetails == null)
{
orderDetails = new ArrayList();
}
return orderDetails;
}
set { orderDetails = value; }
get { return new ReadOnlyCollection<OrderDetail>(orderDetails ?? new List<OrderDetail>()); }
}
#endregion

View File

@@ -24,9 +24,9 @@ namespace Spring.Northwind.Domain
{
public class OrderDetail
{
protected double unitPrice;
protected decimal unitPrice;
protected int quantity;
protected double discount;
protected decimal discount;
protected Order order;
protected int productId;
//protected Product product;
@@ -44,7 +44,7 @@ namespace Spring.Northwind.Domain
return order.Id.GetHashCode() + 29*productId.GetHashCode();
}
public double UnitPrice
public decimal UnitPrice
{
get { return this.unitPrice; }
set { this.unitPrice = value; }
@@ -56,7 +56,7 @@ namespace Spring.Northwind.Domain
set { this.quantity = value; }
}
public double Discount
public decimal Discount
{
get { return this.discount; }
set { this.discount = value; }

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -43,6 +43,9 @@
<Compile Include="Dao\ISupportsDeleteDao.cs" />
<Compile Include="Dao\ISupportsSave.cs" />
<Compile Include="Domain\Customer.cs" />
<Compile Include="Domain\DefaultCustomerClassificationCalculator.cs" />
<Compile Include="Domain\ICustomer.cs" />
<Compile Include="Domain\ICustomerClassificationCalculator.cs" />
<Compile Include="Domain\Order.cs" />
<Compile Include="Domain\OrderDetail.cs" />
<Compile Include="Domain\Product.cs" />

View File

@@ -38,6 +38,9 @@
<Compile Include="Dao\ISupportsDeleteDao.cs" />
<Compile Include="Dao\ISupportsSave.cs" />
<Compile Include="Domain\Customer.cs" />
<Compile Include="Domain\DefaultCustomerClassificationCalculator.cs" />
<Compile Include="Domain\ICustomer.cs" />
<Compile Include="Domain\ICustomerClassificationCalculator.cs" />
<Compile Include="Domain\Order.cs" />
<Compile Include="Domain\OrderDetail.cs" />
<Compile Include="Domain\Product.cs" />

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -31,8 +30,18 @@ using System.Runtime.InteropServices;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
#pragma warning disable 414
class LinkThem
{
private Spring.Data.NHibernate.HibernateTemplate ht = null;
private Spring.Web.UI.Page page = null;
}
private Common.Logging.ILog log = null;
public LinkThem(Spring.Data.NHibernate.HibernateTemplate ht, Spring.Web.UI.Page page, Common.Logging.ILog log)
{
this.ht = ht;
this.page = page;
this.log = log;
}
}
#pragma warning restore 414

View File

@@ -14,6 +14,21 @@
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -33,53 +48,54 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Antlr3.Runtime, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL">
<Reference Include="Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\lib\NHibernate21\net\2.0\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="Common.Logging, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Common.Logging.Log4Net, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<Reference Include="Common.Logging.Log4Net, Version=1.2.0.2, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net\2.0\Common.Logging.Log4Net.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll</HintPath>
</Reference>
<Reference Include="log4net, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\lib\NHibernate21\net\2.0\log4net.dll</HintPath>
</Reference>
<Reference Include="NHibernate, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll</HintPath>
</Reference>
<Reference Include="Spring.Core, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Spring.Aop, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll</HintPath>
</Reference>
<Reference Include="Spring.Core, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Core.dll</HintPath>
</Reference>
<Reference Include="Spring.Data, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Spring.Data, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Data.dll</HintPath>
</Reference>
<Reference Include="Spring.Data.NHibernate21, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Spring.Data.NHibernate21, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Data.NHibernate21.dll</HintPath>
</Reference>
<Reference Include="Spring.Web, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Spring.Web, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Web.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<Reference Include="System.Web" />
<Reference Include="System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net\2.0\System.Data.SQLite.DLL</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
@@ -87,6 +103,33 @@
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -35,6 +35,7 @@
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Common.Logging.Log4Net, Version=1.2.0.2, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -46,12 +47,16 @@
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net\2.0\log4net.dll</HintPath>
<HintPath>..\..\..\..\..\lib\NHibernate21\net\2.0\log4net.dll</HintPath>
</Reference>
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll</HintPath>
</Reference>
<Reference Include="Spring.Aop, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll</HintPath>
</Reference>
<Reference Include="Spring.Core, Version=1.1.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\2.0\debug\Spring.Core.dll</HintPath>

View File

@@ -95,6 +95,7 @@ fieldset legend {
{
border: solid 1px Tan;
margin-left: 10px;
width: 95%;
}
.datagrid-header

View File

@@ -12,6 +12,10 @@
be in shipped state (they have shipped date) or they can be waiting for
shipment. You can ship orders that aren't shipped yet on the orders screen.
</p>
<p>
The customer entity is created with Spring and injected with an ICustomerClassificationCalculator
which includes basic calculation algorithm that we can use to calculate customer's value to us.
</p>
<br />
<asp:DataGrid id="customerList" runat="server"
AllowPaging="true"
@@ -27,6 +31,7 @@
<asp:BoundColumn HeaderText="Id" DataField="ID" />
<asp:ButtonColumn HeaderText="Name" DataTextField="ContactName" CommandName="ViewCustomer" />
<asp:BoundColumn HeaderText="Company" DataField="CompanyName"/>
<asp:BoundColumn HeaderText="Classification" DataField="Classification"/>
<asp:ButtonColumn CommandName="ViewOrders" Text="Orders" />
</Columns>

View File

@@ -1,6 +1,9 @@
using System;
using System.Collections;
using System.Web.UI.WebControls;
using NHibernate;
using Spring.Northwind.Domain;
public partial class CustomerOrders : Spring.Web.UI.Page

View File

@@ -1,8 +1,6 @@
using System;
using System.IO;
using Common.Logging;
using log4net.Appender;
using log4net.Core;
using log4net.Layout;
@@ -11,7 +9,6 @@ using log4net.Repository;
using Spring.Northwind.Service;
using Spring.Web.UI;
using ILog=log4net.ILog;
using LogManager=log4net.LogManager;
public partial class FullfillmentResult : Page

View File

@@ -75,7 +75,7 @@ namespace Spring.Northwind.IntegrationTests
{
Assert.AreEqual(91, customerDao.GetAll().Count);
Customer c = new Customer();
Customer c = new Customer(new DefaultCustomerClassificationCalculator());
c.Id = "MPOLL";
c.CompanyName = "Interface21";
customerDao.Save(c);