-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBusinessLayerDbContextSettings.cs
106 lines (90 loc) · 3.86 KB
/
BusinessLayerDbContextSettings.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace Havit.Data.EntityFrameworkCore.BusinessLayer;
/// <summary>
/// Konfigurácia <see cref="BusinessLayerDbContext"/>u, t.j. DbContextu pre Business Layer aplikácie (aka DB Migrations).
///
/// <remarks>Úprava konfigurácie prebieha v metóde <see cref="BusinessLayerDbContext.CreateDbContextSettings"/>, ktorú je potrebné prepísať v aplikačnom DbContexte.</remarks>
/// </summary>
public class BusinessLayerDbContextSettings
{
/// <summary>
/// Indikuje používání konvence CollectionExtendedPropertiesConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseCollectionExtendedPropertiesConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence CollectionOrderIndexConvention.
/// Výchozí hodnota je false (WIP).
/// </summary>
public bool UseCollectionOrderIndexConvention { get; set; } = false;
/// <summary>
/// Indikuje používání konvence ExtendedPropertiesConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseAttributeBasedExtendedPropertiesConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence DefaultValueAttributeConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseDefaultValueAttributeConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence DefaultValueSqlAttributeConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseDefaultValueSqlAttributeConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence ForeignKeysColumnNamesConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseForeignKeysColumnNamesConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence CharColumnTypeForCharPropertyConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseCharColumnTypeForCharPropertyConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence IndexForForeignKeysConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseForeignKeysIndexConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence IndexForLanguageUiCulturePropertyConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseLanguageUiCultureIndexConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence IndexForLocalizationTableConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool LocalizationTableIndexConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence LocalizationTablesParentEntitiesConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseLocalizationTablesParentEntitiesConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence NamespaceExtendedPropertyConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseNamespaceExtendedPropertyConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence PrefixedTablePrimaryKeysConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UsePrefixedTablePrimaryKeysConvention { get; set; } = true;
/// <summary>
/// Indikuje používání konvence XmlCommentsForDescriptionPropertyConvention.
/// Výchozí hodnota je true.
/// </summary>
public bool UseXmlCommentsForDescriptionPropertyConvention { get; set; } = true;
/// <summary>
/// <see cref="Assembly"/>, ktorá obsahuje Model Extendery (objekty, ktoré reprezentujú rozšírenie dátového modelu napr. o uložené procedúry).
/// </summary>
/// <remarks>
/// <para>Štandardne sa nastaví na assembly, v ktorej sa nachádza DbContext aplikácie (t.j. trieda, ktorá dedí od <see cref="BusinessLayerDbContext"/>).</para>
/// </remarks>
public Assembly ModelExtensionsAssembly { get; set; }
}