XafApplication.ConnectionString Property
Specifies the connection string which is used to connect to the application’s database or to the Application Server.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v18.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A string value which specifies the parameters needed to establish the initial connection. |
Remarks
The default connection string provides connection to the SQL Server. You can specify another connection string. For this purpose, use the Application Designer or configuration file. In configuration files, a connection string is specified in the connectionStrings section. You can specify a connection string for development and other compilation modes. In this instance, set the ConnectionString property in the following manner:
static class Program {
static void Main() {
//...
MySolutionWindowsFormsApplication application = new MySolutionWindowsFormsApplication();
application.ConnectionString =
ConfigurationManager.ConnectionStrings["ConnectionStringForDevelopment"].ConnectionString;
//...
application.Setup();
//...
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ConnectionString property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.