Exemplo n.º 1
0
        public static bool CanUseRemoteAvg(IQueryProvider provider)
        {
            var providerInfo = new QueryProviderInfo(provider);

            if (providerInfo.IsEFCore)
            {
                var version = providerInfo.Version.Major;

                // https://github.com/aspnet/EntityFrameworkCore/issues/11711
                if (version == 2 || version == 3)
                {
                    return(false);
                }
            }

            return(true);
        }
 public ReflectionAsyncAdapter(QueryProviderInfo providerInfo)
 {
     _providerInfo = providerInfo;
 }
 static bool IsEF6(QueryProviderInfo providerInfo)
 => providerInfo.IsEFClassic && providerInfo.Version.Major >= 6;
 public static bool SupportsProvider(QueryProviderInfo providerInfo)
 => providerInfo.IsEFCore ||
 IsEF6(providerInfo) ||
 providerInfo.IsNH ||
 providerInfo.IsXPO;
 public AsyncHelper(IQueryProvider provider, QueryProviderInfo providerInfo, CancellationToken cancellationToken)
 {
     Provider          = provider;
     ProviderInfo      = providerInfo;
     CancellationToken = cancellationToken;
 }