<PackageReference Include="Microsoft.Data.SqlClient" Version="7.1.0-preview1.26124.5" />

Microsoft.Data.SqlClient.SqlConnectionEncryptOption

public sealed class SqlConnectionEncryptOption
These options are used to control encryption behavior of the communication between the server and the client.
public static SqlConnectionEncryptOption Mandatory { get; }

Specifies that TLS encryption is required when connecting to the server. If the server doesn't support encryption, the connection will fail.

public static SqlConnectionEncryptOption Optional { get; }

Specifies that TLS encryption is optional when connecting to the server. If the server requires encryption, encryption will be negotiated.

public static SqlConnectionEncryptOption Strict { get; }

Enables and requires TDS 8.0, TLS encryption to the server. If the server doesn't support TDS 8.0, TLS encryption, the connection will fail.

public static bool op_Implicit(SqlConnectionEncryptOption value)

Enables implicit conversion of a SqlConnectionEncryptOption to a boolean. Mandatory and Strict convert to true. Optional converts to false.

public static SqlConnectionEncryptOption op_Implicit(bool value)

Enables implicit conversion of a boolean to a SqlConnectionEncryptOption. A value of true converts to Mandatory. A value of false converts to Optional.

public static SqlConnectionEncryptOption Parse(string value)

Converts the specified string representation of a logical value to its SqlConnectionEncryptOption equivalent.

public static bool TryParse(string value, out SqlConnectionEncryptOption result)

Converts the specified string representation of a logical value to its SqlConnectionEncryptOption equivalent and returns a value that indicates whether the conversion succeeded.