.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

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.v19.2.dll

Declaration

public string ConnectionString { get; set; }
Public Property ConnectionString As String
public string ConnectionString { get; set; }
Public Property ConnectionString As String
public string ConnectionString { get; set; }
Public Property ConnectionString As String

Property Value

Type Description
String

A string value which specifies the parameters needed to establish the initial connection.

Property Value

Type Description
String

A string value which specifies the parameters needed to establish the initial connection.

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();
      //...
   }
}
See Also