Class SqlServerCacheKeyGenerator
Cache key generator for Microsoft SQL Server used by DatabaseSchemaCache.
Inheritance
System.Object
SqlServerCacheKeyGenerator
Namespace: Kros.Data.Schema.SqlServer
Assembly: Kros.Utils.dll
Syntax
public class SqlServerCacheKeyGenerator : ISchemaCacheKeyGenerator<SqlConnection>, ISchemaCacheKeyGenerator
Methods
GenerateKey(SqlConnection)
Generates a cache key for connection
.
The generated key is a string "SqlServer:SERVER\database
".
Declaration
public string GenerateKey(SqlConnection connection)
Parameters
Type | Name | Description |
---|---|---|
System.Data.SqlClient.SqlConnection | connection | Database connection. |
Returns
Type | Description |
---|---|
System.String | String. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Value of |
Explicit Interface Implementations
ISchemaCacheKeyGenerator.GenerateKey(Object)
Declaration
string ISchemaCacheKeyGenerator.GenerateKey(object connection)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connection |
Returns
Type | Description |
---|---|
System.String |