Spring.NET 1.3.0
1.配置web.config
代码
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
</sectionGroup>
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
</sectionGroup>
<spring>
<context>...</context>
<parsers>
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" />
</parsers>
</spring>
<context>...</context>
<parsers>
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" />
</parsers>
</spring>
2.配置DbProvider
代码
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:db="http://www.springframework.net/database">
<db:provider id="DbProvider"
provider="ystem.Data.OleDb"
connectionString=""/>
</objects>
<objects xmlns="http://www.springframework.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:db="http://www.springframework.net/database">
<db:provider id="DbProvider"
provider="ystem.Data.OleDb"
connectionString=""/>
</objects>