SteffenMangold/EntityFrameworkCore.Cacheable

View on GitHub

Showing 10 of 10 total issues

Class SharedTypeExtensions has 28 methods (exceeds 20 allowed). Consider refactoring.
Open

    [DebuggerStepThrough]
    internal static class SharedTypeExtensions
    {
        public static Type UnwrapNullableType(this Type type) => Nullable.GetUnderlyingType(type) ?? type;

Severity: Minor
Found in EntityFrameworkCore.Cacheable/Extensions/SharedTypeExtensions.cs - About 3 hrs to fix

    File CustomQueryCompiler.cs has 289 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using EntityFrameworkCore.Cacheable.Diagnostics;
    using EntityFrameworkCore.Cacheable.ExpressionVisitors;
    using Microsoft.EntityFrameworkCore;
    using Microsoft.EntityFrameworkCore.Diagnostics;
    using Microsoft.EntityFrameworkCore.Infrastructure;
    Severity: Minor
    Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 2 hrs to fix

      File SharedTypeExtensions.cs has 275 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System.Collections.Generic;
      using System.Diagnostics;
      using System.Linq;
      using System.Reflection;
      using System.Runtime.CompilerServices;
      Severity: Minor
      Found in EntityFrameworkCore.Cacheable/Extensions/SharedTypeExtensions.cs - About 2 hrs to fix

        Method CompileQueryCore has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private static Func<QueryContext, TResult> CompileQueryCore<TResult>(
                   Expression query,
                   IQueryModelGenerator queryModelGenerator,
                   IDatabase database,
                   IDiagnosticsLogger<DbLoggerCategory.Query> logger,
        Severity: Minor
        Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                          if (genericDefinition == typeof(Tuple<>)
                              || genericDefinition == typeof(Tuple<,>)
                              || genericDefinition == typeof(Tuple<,,>)
                              || genericDefinition == typeof(Tuple<,,,>)
                              || genericDefinition == typeof(Tuple<,,,,>)
          Severity: Critical
          Found in EntityFrameworkCore.Cacheable/Extensions/SharedTypeExtensions.cs - About 1 hr to fix

            Method Execute has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public override TResult Execute<TResult>(Expression query)
                    {
                        Check.NotNull(query, nameof(query));
            
                        var queryContext = _queryContextFactory.Create();
            Severity: Minor
            Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 1 hr to fix

              Method ExecuteAsync has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public override IAsyncEnumerable<TResult> ExecuteAsync<TResult>(Expression query)
                      {
                          Check.NotNull(query, nameof(query));
              
                          var queryContext = _queryContextFactory.Create();
              Severity: Minor
              Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 1 hr to fix

                Method ExecuteAsync has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public override Task<TResult> ExecuteAsync<TResult>(Expression query, CancellationToken cancellationToken)
                        {
                            Check.NotNull(query, nameof(query));
                
                            var queryContext = _queryContextFactory.Create();
                Severity: Minor
                Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 1 hr to fix

                  Method ExecuteSingletonAsyncQuery has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                              QueryContext queryContext,
                              Func<QueryContext, IAsyncEnumerable<TResult>> compiledQuery,
                              IDiagnosticsLogger<DbLoggerCategory.Query> logger,
                              Type contextType,
                              Func<object, Exception, string> logFormatter,
                  Severity: Major
                  Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 1 hr to fix

                    Method CompileQueryCore has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                               Expression query,
                               IQueryModelGenerator queryModelGenerator,
                               IDatabase database,
                               IDiagnosticsLogger<DbLoggerCategory.Query> logger,
                               Type contextType,
                    Severity: Minor
                    Found in EntityFrameworkCore.Cacheable/CustomQueryCompiler.cs - About 45 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language