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

loresoft / EntityFrameworkCore.Generator / 27767067052

18 Jun 2026 02:35PM UTC coverage: 70.481% (-4.9%) from 75.418%
27767067052

push

github

pwelter34
Update SourceSynchronizer.cs

913 of 1785 branches covered (51.15%)

Branch coverage included in aggregate %.

5 of 6 new or added lines in 1 file covered. (83.33%)

297 existing lines in 10 files now uncovered.

4094 of 5319 relevant lines covered (76.97%)

1291.15 hits per line

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

27.27
/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()
18✔
15
    {
16
    }
18✔
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>
22
    public EntityCollection(IEnumerable<Entity> collection) : base(collection)
×
23
    {
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>
30
    public EntityCollection(int capacity) : base(capacity)
×
31
    {
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))
247!
53
            return null;
×
54

55
        return this.FirstOrDefault(x => x.TableName == tableName && x.TableSchema == tableSchema);
247✔
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
    {
67
        return ByTable(
×
68
            tableName: tableSchema.QualifiedName.Name,
×
69
            tableSchema: tableSchema.QualifiedName.Schema
×
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
    {
UNCOV
82
        if (string.IsNullOrEmpty(className))
×
83
            return null;
×
84

UNCOV
85
        return this.FirstOrDefault(x => x.EntityClass == className);
×
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