Back to Devexpress

DataConnectionBase.Name Property

corelibraries-devexpress-dot-dataaccess-dot-dataconnectionbase-a69ad151.md

latest6.8 KB
Original Source

DataConnectionBase.Name Property

Gets or sets the name of a data connection.

Namespace : DevExpress.DataAccess

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
[Browsable(false)]
public string Name { get; set; }
vb
<Browsable(False)>
Public Property Name As String

Property Value

TypeDescription
String

A String that specifies the name of a data connection.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Name 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.

reporting-winforms-wizard-data-connections/CS/T119350/CustomConnectionStorageService.cs#L21

csharp
DefaultStorage.Contains(connectionName) ||
    GetConnectionsFromXml().Any(c => string.Equals(c.Name, connectionName)) :
GetConnectionsFromXml().Any(c => string.Equals(c.Name, connectionName));

reporting-winforms-designer-connection-save-safe/CS/ReportingEUDSaveReportWithoutConnectionParams/CustomConnectionStorageService.cs#L21

csharp
return IncludeApplicationConnections ?
    DefaultStorage.Contains(connectionName) || ConnectionProviderService.GetConnectionsFromXml().Any(c => string.Equals(c.Name, connectionName)) :
    ConnectionProviderService.GetConnectionsFromXml().Any(c => string.Equals(c.Name, connectionName));

mvc-dashboard-customize-data-store-schema-for-sql-data-sources/CS/MvcDashboard_CustomSchemaProvider/Code/ManualDBSchemaProvider.cs#L42

csharp
// Loads only the Categories and Products tables for the nwindConnection connection.
if (connection.Name == "nwindConnection") {
    if (tables != null) {

web-forms-dashboard-custom-database-schema-for-sql-data-sources/CS/WebFormsDashboard_CustomSchemaProvider/ManualDBSchemaProvider.cs#L41

csharp
// Loads only the Categories and Products tables for the NWindConnectionString connection.
if (connection.Name == "NWindConnectionString") {
    if (tables != null) {

asp-net-core-dashboard-custom-database-schema-for-sql-data-sources/CS/WebDashboardAspNetCore/ManualDBSchemaProvider.cs#L41

csharp
// Loads only the Categories and Products tables for the NWindConnectionString connection.
if (connection.Name == "NWindConnectionString") {
    if (tables != null) {

reporting-winforms-wizard-data-connections/VB/T119350/CustomConnectionStorageService.vb#L19

vb
Private Function Contains(ByVal connectionName As String) As Boolean Implements IConnectionStorageService.Contains
    Return If(IncludeApplicationConnections, DefaultStorage.Contains(connectionName) OrElse GetConnectionsFromXml().Any(Function(c) String.Equals(c.Name, connectionName)), GetConnectionsFromXml().Any(Function(c) String.Equals(c.Name, connectionName)))
End Function

reporting-winforms-designer-connection-save-safe/VB/ReportingEUDSaveReportWithoutConnectionParams/CustomConnectionStorageService.vb#L24

vb
Private Function IConnectionStorageService_Contains(ByVal connectionName As String) As Boolean Implements IConnectionStorageService.Contains
    Return If(IncludeApplicationConnections, DefaultStorage.Contains(connectionName) OrElse ConnectionProviderService.GetConnectionsFromXml().Any(Function(c) String.Equals(c.Name, connectionName)), ConnectionProviderService.GetConnectionsFromXml().Any(Function(c) String.Equals(c.Name, connectionName)))
End Function

mvc-dashboard-customize-data-store-schema-for-sql-data-sources/VB/MvcDashboard_CustomSchemaProvider/Code/ManualDBSchemaProvider.vb#L41

vb
' Loads only the Categories and Products tables for the nwindConnection connection.
If connection.Name = "nwindConnection" Then
    If tables IsNot Nothing Then

web-forms-dashboard-custom-database-schema-for-sql-data-sources/VB/WebFormsDashboard_CustomSchemaProvider/ManualDBSchemaProvider.vb#L42

vb
' Loads only the Categories and Products tables for the NWindConnectionString connection.
If Equals(connection.Name, "NWindConnectionString") Then
    If tables IsNot Nothing Then

See Also

DataConnectionBase Class

DataConnectionBase Members

DevExpress.DataAccess Namespace