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

loresoft / EntityFrameworkCore.Generator / 9036122521

10 May 2024 05:55PM UTC coverage: 57.012% (+2.3%) from 54.745%
9036122521

push

github

pwelter34
update packages

563 of 1111 branches covered (50.68%)

Branch coverage included in aggregate %.

1811 of 3053 relevant lines covered (59.32%)

83.77 hits per line

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

54.55
/src/EntityFrameworkCore.Generator.Core/Metadata/Generation/EntityCollection.cs
1
using System.Collections.Generic;
2
using System.Linq;
3

4
namespace EntityFrameworkCore.Generator.Metadata.Generation;
5

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

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

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

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

43
    /// <summary>
44
    /// Get <see cref="Entity" /> with the specified table <paramref name="tableName" /> and <paramref name="tableSchema" />.
45
    /// </summary>
46
    /// <param name="tableName">The name of the table.</param>
47
    /// <param name="tableSchema">The table schema.</param>
48
    /// <returns>
49
    /// The <see cref="Entity" /> with the specified table <paramref name="tableName" /> and <paramref name="tableSchema" />.
50
    /// </returns>
51
    public Entity ByTable(string tableName, string tableSchema)
52
    {
53
        return this.FirstOrDefault(x => x.TableName == tableName && x.TableSchema == tableSchema);
515✔
54
    }
55

56
    /// <summary>
57
    /// Get <see cref="Entity" /> with the specified <paramref name="className" />.
58
    /// </summary>
59
    /// <param name="className">Name of the class.</param>
60
    /// <returns>
61
    /// The <see cref="Entity" /> with the specified <paramref name="className" />.
62
    /// </returns>
63
    public Entity ByClass(string className)
64
    {
65
        return this.FirstOrDefault(x => x.EntityClass == className);
154✔
66
    }
67
}
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