EntityConnection.ServerVersion 属性
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
获取一个字符串,该字符串包含客户端连接到的数据源的版本。
命名空间: System.Data.Entity.Core.EntityClient
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")> _
Public Overrides ReadOnly Property ServerVersion As String
Get
用法
Dim instance As EntityConnection
Dim value As String
value = instance.ServerVersion
[SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public override string ServerVersion { get; }
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public:
virtual property String^ ServerVersion {
String^ get () override;
}
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
abstract ServerVersion : string
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
override ServerVersion : string
override function get ServerVersion () : String
属性值
类型:System.String
提供程序连接字符串中包含的数据源的版本。