Mercurial > pub > bltoolkit
view Tools/DocGen/Content/Doc/Data/OpenConfig1.htm @ 5:f7d63a092920
Исправлено условие Where в тех случаях, когда репозитарий не является генериком
author | cin |
---|---|
date | Tue, 10 Mar 2015 16:02:11 +0300 |
parents | f990fcb411a9 |
children |
line wrap: on
line source
<% title # Configure using app.config %> <% group # Configuration %> <% order # 10 %> <p class='j'> Since Microsoft has released FW 2.0 and the <b><connectionStrings></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><appSettings></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><appSettings></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>