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

loresoft / MongoDB.Abstracts / 13118055932

03 Feb 2025 04:24PM UTC coverage: 77.474% (-1.4%) from 78.879%
13118055932

push

github

pwelter34
add tests, update readme

32 of 64 branches covered (50.0%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

21 existing lines in 4 files now uncovered.

195 of 229 relevant lines covered (85.15%)

7.63 hits per line

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

50.0
/src/MongoDB.Abstracts/MongoEntityQuery.cs
1
// Ignore Spelling: Mongo
2

3
using System.Linq.Expressions;
4

5
using MongoDB.Driver;
6

7
namespace MongoDB.Abstracts;
8

9
/// <summary>
10
/// A MongoDB data query base class.
11
/// </summary>
12
/// <typeparam name="TEntity">The type of the entity.</typeparam>
13
public class MongoEntityQuery<TEntity> : MongoQuery<TEntity, string>, IMongoEntityQuery<TEntity>
14
    where TEntity : class, IMongoEntity
15
{
16
    /// <summary>
17
    /// Initializes a new instance of the <see cref="MongoEntityQuery{TEntity}" /> class.
18
    /// </summary>
19
    /// <param name="mongoDatabase">The <see cref="IMongoDatabase"/> to use for this instance</param>
20
    public MongoEntityQuery(IMongoDatabase mongoDatabase) : base(mongoDatabase)
3✔
21
    {
22
    }
3✔
23

24
    /// <inheritdoc/>
25
    protected override string EntityKey(TEntity entity)
26
    {
UNCOV
27
        return entity.Id;
×
28
    }
29

30
    /// <inheritdoc/>
31
    protected override Expression<Func<TEntity, bool>> KeyExpression(string key)
32
    {
UNCOV
33
        return entity => entity.Id == key;
×
34
    }
35
}
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