generated from Avanade/avanade-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
SqlServerDatabaseColumns.cs
65 lines (54 loc) · 2.57 KB
/
SqlServerDatabaseColumns.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx
using CoreEx.Database.Extended;
using CoreEx.Entities;
using System.Collections.Generic;
using System.Data;
namespace CoreEx.Database.SqlServer
{
/// <summary>
/// Extends the <see cref="DatabaseColumns"/> adding additional SQL Server specific.
/// </summary>
public class SqlServerDatabaseColumns : DatabaseColumns
{
/// <summary>
/// Gets or sets the session context '<c>Username</c>' column name.
/// </summary>
public string SessionContextUsernameName { get; set; } = "Username";
/// <summary>
/// Gets or sets the session context '<c>Timestamp</c>' column name.
/// </summary>
public string SessionContextTimestampName { get; set; } = "Timestamp";
/// <summary>
/// Gets or sets the <see cref="ITenantId.TenantId"/> column name.
/// </summary>
public string SessionContextTenantIdName { get; set; } = "TenantId";
/// <summary>
/// Gets or sets the session context '<c>UserId</c>' column name.
/// </summary>
public string SessionContextUserIdName { get; set; } = "UserId";
/// <summary>
/// Gets or sets the table-value parameter type name for an <see cref="IEnumerable{String}"/>.
/// </summary>
public string TvpStringListTypeName { get; set; } = "[dbo].[udtNVarCharList]";
/// <summary>
/// Gets or sets the table-value parameter type name for an <see cref="IEnumerable{Int32}"/>.
/// </summary>
public string TvpInt32ListTypeName { get; set; } = "[dbo].[udtIntList]";
/// <summary>
/// Gets or sets the table-value parameter type name for an <see cref="IEnumerable{Int64}"/>.
/// </summary>
public string TvpInt64ListTypeName { get; set; } = "[dbo].[udtBigIntList]";
/// <summary>
/// Gets or sets the table-value parameter type name for an <see cref="IEnumerable{Guid}"/>.
/// </summary>
public string TvpGuidListTypeName { get; set; } = "[dbo].[udtUniqueIdentifierList]";
/// <summary>
/// Gets or sets the table-value parameter type name for an <see cref="IEnumerable{DateTime}"/>.
/// </summary>
public string TvpDateTimeListTypeName { get; set; } = "[dbo].[udtDateTime2]";
/// <summary>
/// Gets or sets the table-value parameter <see cref="DataTable"/> column name for list values.
/// </summary>
public string TvpListValueColumnName { get; set; } = "Value";
}
}