The requested page is not available for the requested platform. You are viewing the content for Default platform.

XafApplication.Connection Property

Specifies the connection to the database used by the application.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

[Browsable(false)]
public IDbConnection Connection { get; set; }
<Browsable(False)>
Public Property Connection As IDbConnection

Property Value

Type Description
IDbConnection

A IDbConnection object representing an open connection to a data source.

Remarks

To set the appropriate connection, we recommend that you use the Application Designer's Connection section. Via this section, you can both set the required connection and specify the corresponding connection string. If you need to specify the Connection property in code, do it between the XafApplication object's creation and setup:

static void Main() {
   //...
   MySolutionWindowsFormsApplication application = new MySolutionWindowsFormsApplication();
   application.Connection = new OracleConnection(...);
   application.Setup();
   //...
}

By default, SQL connection is used.

See Also