diff Tools/DocGen/Content/Doc/Data/OpenConfig1.htm @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Tools/DocGen/Content/Doc/Data/OpenConfig1.htm	Thu Mar 27 21:46:09 2014 +0400
@@ -0,0 +1,46 @@
+<% title # Configure using app.config %>
+<% group # Configuration %>
+<% order # 10 %>
+<p class='j'>
+Since Microsoft has released FW 2.0 and the <b>&lt;connectionStrings&gt;</b> section of
+configuration file is available, it should be used. This configuration method is preferable.
+The following method demonstrates this ability.
+</p>
+OpenConfig1FW2.cs
+<% ..\..\..\HowTo\Data\OpenConfig1FW2.cs %>
+App.config
+<% Doc\Data\App1.config %>
+
+<p class='j'>
+In addition <b>BLToolkit</b> supports an alternative way which uses the <b>&lt;appSettings&gt;</b> section.
+At the bottom of this page you can find a demo <a href='#cfg'>App.config</a> file with a few examples.
+</p>
+<p class='j'>
+<b>BLToolkit</b> recognizes configuration strings in the <b>&lt;appSettings&gt;</b> section 
+by looking for a <b>ConnectionString</b> key prefix. Actual key value can be the following:
+
+<table class='data'>
+<tr><th>key value</th><th>Provider</th><th>Configuration</th></tr>
+<tr><td><span class='kw'>key</span>=<span class='str'>"ConnectionString"</span></td><td align='right'>default provider</td><td align='right'>default configuration</td></tr>
+<tr><td><span class='kw'>key</span>=<span class='str'>"ConnectionString.Foo.Bar"</span></td><td align='right'>'Foo' provider</td><td align='right'>'Bar' configuration</td></tr>
+<tr><td><span class='kw'>key</span>=<span class='str'>"ConnectionString.Foo."</span></td><td align='right'>'Foo' provider</td><td align='right'>default configuration</td></tr>
+<tr><td><span class='kw'>key</span>=<span class='str'>"ConnectionString.Foo"</span></td><td align='right'>default provider</td><td align='right'>'Foo' configuration</td></tr>
+<tr><td align='right'>or</td><td align='right'>'Foo' provider</td><td align='right'>default configuration</td></tr>
+<tr><td><span class='kw'>key</span>=<span class='str'>"ConnectionString..Foo"</span></td><td align='right'>default provider</td><td align='right'>'Foo' configuration</td></tr>
+<tr><td><span class='kw'>key</span>=<span class='str'>"ConnectionString..Foo.Bar"</span></td><td align='right'>default provider</td><td align='right'>'Foo.Bar' configuration</td></tr>
+</table>
+
+Default provider is <b>SqlDataProvider</b>.
+See also <a href='DataProvider/index.htm'>Data Providers</a>.
+</p>
+
+OpenConfig1.cs
+<% ..\..\..\HowTo\Data\OpenConfig1.cs %>
+<a name='cfg'/>App.config
+<% ..\..\..\UnitTests\All\App.config %>
+
+<p class='j'>The default configuration can be set by a configuration file:</p>
+App.config
+<% Doc\Data\App2.config %>
+
+<a href="CreateSql.htm">Create.sql script</a>