संपादित करें

इसके माध्यम से साझा किया गया


DbProviderFactories.TryGetFactory(String, DbProviderFactory) Method

Definition

Attempts to get the DbProviderFactory registered under the specified invariant provider name.

public:
 static bool TryGetFactory(System::String ^ providerInvariantName, [Runtime::InteropServices::Out] System::Data::Common::DbProviderFactory ^ % factory);
public static bool TryGetFactory (string providerInvariantName, out System.Data.Common.DbProviderFactory? factory);
public static bool TryGetFactory (string providerInvariantName, out System.Data.Common.DbProviderFactory factory);
static member TryGetFactory : string * DbProviderFactory -> bool
Public Shared Function TryGetFactory (providerInvariantName As String, ByRef factory As DbProviderFactory) As Boolean

Parameters

providerInvariantName
String

The invariant provider name to look up.

factory
DbProviderFactory

When this method returns, contains the DbProviderFactory associated with the specified invariant provider name, if the name is found; otherwise, null. This parameter is passed uninitialized.

Returns

true if a provider is registered under the specified invariant provider name; otherwise, false.

Applies to