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

loresoft / EntityFrameworkCore.Generator / 27730465225

18 Jun 2026 01:21AM UTC coverage: 74.693% (+19.8%) from 54.885%
27730465225

push

github

pwelter34
update tests

922 of 1609 branches covered (57.3%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 2 files covered. (100.0%)

230 existing lines in 23 files now uncovered.

4007 of 4990 relevant lines covered (80.3%)

1258.69 hits per line

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

40.91
/src/EntityFrameworkCore.Generator.Core/Metadata/Generation/EntityCollection.cs
1
using SchemaSaurus.Metadata;
2

3
namespace EntityFrameworkCore.Generator.Metadata.Generation;
4

5
/// <summary>
6
/// A collection of <see cref="Entity"/>
7
/// </summary>
8
public class EntityCollection
9
    : List<Entity>
10
{
11
    /// <summary>
12
    /// Initializes a new instance of the <see cref="EntityCollection"/> class.
13
    /// </summary>
14
    public EntityCollection()
16✔
15
    {
16
    }
16✔
17

18
    /// <summary>
19
    /// Initializes a new instance of the <see cref="EntityCollection"/> class.
20
    /// </summary>
21
    /// <param name="collection">The collection whose elements are copied to the new list.</param>
UNCOV
22
    public EntityCollection(IEnumerable<Entity> collection) : base(collection)
×
23
    {
UNCOV
24
    }
×
25

26
    /// <summary>
27
    /// Initializes a new instance of the <see cref="EntityCollection"/> class.
28
    /// </summary>
29
    /// <param name="capacity">The number of elements that the new list can initially store.</param>
UNCOV
30
    public EntityCollection(int capacity) : base(capacity)
×
31
    {
UNCOV
32
    }
×
33

34
    /// <summary>
35
    /// Gets or sets a value indicating whether this instance is processed.
36
    /// </summary>
37
    /// <value>
38
    ///   <c>true</c> if this instance is processed; otherwise, <c>false</c>.
39
    /// </value>
40
    public bool IsProcessed { get; set; }
41

42
    /// <summary>
43
    /// Get <see cref="Entity" /> with the specified table <paramref name="tableName" /> and <paramref name="tableSchema" />.
44
    /// </summary>
45
    /// <param name="tableName">The name of the table.</param>
46
    /// <param name="tableSchema">The table schema.</param>
47
    /// <returns>
48
    /// The <see cref="Entity" /> with the specified table <paramref name="tableName" /> and <paramref name="tableSchema" />.
49
    /// </returns>
50
    public Entity? ByTable(string? tableName, string? tableSchema)
51
    {
52
        if (string.IsNullOrEmpty(tableName) && string.IsNullOrEmpty(tableSchema))
258!
UNCOV
53
            return null;
×
54

55
        return this.FirstOrDefault(x => x.TableName == tableName && x.TableSchema == tableSchema);
258✔
56
    }
57

58
    /// <summary>
59
    /// Get <see cref="Entity" /> with the specified <paramref name="tableSchema" />.
60
    /// </summary>
61
    /// <param name="tableSchema">The table schema.</param>
62
    /// <returns>
63
    /// The <see cref="Entity" /> with the specified <paramref name="tableSchema" />.
64
    /// </returns>
65
    public Entity? ByTable(Table tableSchema)
66
    {
UNCOV
67
        return ByTable(
×
UNCOV
68
            tableName: tableSchema.QualifiedName.Name,
×
69
            tableSchema: tableSchema.QualifiedName.Schema
×
UNCOV
70
        );
×
71
    }
72

73
    /// <summary>
74
    /// Get <see cref="Entity" /> with the specified <paramref name="className" />.
75
    /// </summary>
76
    /// <param name="className">Name of the class.</param>
77
    /// <returns>
78
    /// The <see cref="Entity" /> with the specified <paramref name="className" />.
79
    /// </returns>
80
    public Entity? ByClass(string? className)
81
    {
82
        if (string.IsNullOrEmpty(className))
11!
UNCOV
83
            return null;
×
84

85
        return this.FirstOrDefault(x => x.EntityClass == className);
11✔
86
    }
87

88
}
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

© 2026 Coveralls, Inc