• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / EntityFrameworkCore.Generator / 15098211199

18 May 2025 05:11PM UTC coverage: 54.862% (-0.07%) from 54.934%
15098211199

push

github

pwelter34
fix tests

620 of 1291 branches covered (48.02%)

Branch coverage included in aggregate %.

1840 of 3193 relevant lines covered (57.63%)

61.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.35
/src/EntityFrameworkCore.Generator.Core/Options/DatabaseOptions.cs
1
// Ignore Spelling: Schemas
2

3
using System.ComponentModel;
4

5
namespace EntityFrameworkCore.Generator.Options;
6

7
/// <summary>
8
/// Database options for reverse engineering the database
9
/// </summary>
10
public class DatabaseOptions : OptionsBase
11
{
12
    /// <summary>
13
    /// Initializes a new instance of the <see cref="DatabaseOptions"/> class.
14
    /// </summary>
15
    /// <param name="variables">The shared variables dictionary.</param>
16
    /// <param name="prefix">The variable key prefix.</param>
17
    public DatabaseOptions(VariableDictionary variables, string? prefix)
18
        : base(variables, AppendPrefix(prefix, "Database"))
10✔
19
    {
20
        Provider = DatabaseProviders.SqlServer;
10✔
21
        TableNaming = TableNaming.Singular;
10✔
22
        Tables = [];
10✔
23
        Schemas = [];
10✔
24
        Exclude = new DatabaseMatchOptions(Variables, Prefix);
10✔
25
    }
10✔
26

27
    /// <summary>
28
    /// Gets or sets the name of the database.
29
    /// </summary>
30
    /// <value>
31
    /// The name of the database.
32
    /// </value>
33
    public string? Name
34
    {
35
        get => GetProperty();
×
36
        set => SetProperty(value);
10✔
37
    }
38

39

40
    /// <summary>
41
    /// Gets or sets the database to generate code for.
42
    /// </summary>
43
    /// <value>
44
    /// The database to generate code for.
45
    /// </value>
46
    [DefaultValue(DatabaseProviders.SqlServer)]
47
    public DatabaseProviders Provider { get; set; }
12✔
48

49

50
    /// <summary>
51
    /// Gets or sets the connection string for reverse engineering the database
52
    /// </summary>
53
    /// <value>
54
    /// The connection string for reverse engineering the database
55
    /// </value>
56
    public string? ConnectionString { get; set; }
6✔
57

58
    /// <summary>
59
    /// Gets or sets the name of the connection in the user secret file.
60
    /// </summary>
61
    /// <value>
62
    /// The name of the connection.
63
    /// </value>
64
    public string? ConnectionName { get; set; }
×
65

66
    /// <summary>
67
    /// Gets or sets the user secrets identifier. A user secrets ID is unique value used to store and identify a collection of secret configuration values.
68
    /// </summary>
69
    /// <value>
70
    /// The user secrets identifier.
71
    /// </value>
72
    public string? UserSecretsId { get; set; }
×
73

74

75
    /// <summary>
76
    /// Gets or sets the table naming hint for how existing tables are named. This is used to determine if the name should be converted.
77
    /// </summary>
78
    /// <value>
79
    /// The table naming hint for how tables are named.
80
    /// </value>
81
    [DefaultValue(TableNaming.Singular)]
82
    public TableNaming TableNaming { get; set; }
41✔
83

84

85

86
    /// <summary>
87
    /// Gets or sets the tables to include in the model, or an empty enumerable to include all
88
    /// </summary>
89
    /// <value>
90
    /// The tables to include in the model, or an empty enumerable to include all
91
    /// </value>
92
    public List<string> Tables { get; }
2✔
93

94
    /// <summary>
95
    /// Gets or sets the schema to include in the model, or an empty enumerable to include all.
96
    /// </summary>
97
    /// <value>
98
    /// The schema to include in the model, or an empty enumerable to include all.
99
    /// </value>
100
    public List<string> Schemas { get; }
2✔
101

102
    /// <summary>
103
    /// Gets or sets the exclude table options.
104
    /// </summary>
105
    /// <value>
106
    /// The exclude table options.
107
    /// </value>
108
    public DatabaseMatchOptions Exclude { get; }
276✔
109

110
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc