 | ConnectionStringConfiguratorNamed Method |
Use the connection string with the given name from the app.config file.
Namespace:
SphinxConnector.FluentApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntaxpublic void Named(
string connectionStringName
)
Public Sub Named (
connectionStringName As String
)
Parameters
- connectionStringName
- Type: SystemString
The name of the connection string in the app.config file.
Exceptions
Examples
Suppose your app.config looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="SphinxConnectionString" connectionString="datasource=192.168.105;port=9306"/>
</connectionStrings>
</configuration>
You can then configure the FulltextStore class to use that connection string like this:
IFulltextStore fulltextStore = new FulltextStore().Initialize();
fulltextStore.ConnectionString.Named("SphinxConnectionString");
See Also