< Summary

Information
Class: Pozitron.QuerySpecification.AsNoTrackingWithIdentityResolutionEvaluator
Assembly: Pozitron.QuerySpecification.EntityFrameworkCore
File(s): /home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification.EntityFrameworkCore/Evaluators/AsNoTrackingWithIdentityResolutionEvaluator.cs
Tag: 44_11195777782
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 17
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
.cctor()100%11100%
Evaluate(...)100%22100%

File(s)

/home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification.EntityFrameworkCore/Evaluators/AsNoTrackingWithIdentityResolutionEvaluator.cs

#LineLine coverage
 1namespace Pozitron.QuerySpecification;
 2
 3public class AsNoTrackingWithIdentityResolutionEvaluator : IEvaluator
 4{
 25    private AsNoTrackingWithIdentityResolutionEvaluator() { }
 16    public static AsNoTrackingWithIdentityResolutionEvaluator Instance = new();
 7
 8    public IQueryable<T> Evaluate<T>(IQueryable<T> source, Specification<T> specification) where T : class
 9    {
 5010        if (specification.AsNoTrackingWithIdentityResolution)
 11        {
 112            source = source.AsNoTrackingWithIdentityResolution();
 13        }
 14
 5015        return source;
 16    }
 17}