private static void configOptions(IServiceCollection services, Action <EFCoreSecondLevelCacheOptions> options)
        {
            var cacheOptions = new EFCoreSecondLevelCacheOptions();

            options.Invoke(cacheOptions);

            if (cacheOptions.CacheProvider == null)
            {
                services.TryAddSingleton <IEFCacheServiceProvider, EFMemoryCacheServiceProvider>();
            }
            else
            {
                if (cacheOptions.CacheProvider == typeof(EFRedisCacheServiceProvider))
                {
                    services.TryAddSingleton <IConnectionMultiplexer>(_ => ConnectionMultiplexer.Connect(cacheOptions.RedisConfiguration));
                    services.TryAddSingleton <IRedisDbCache, RedisDbCache>();
                }
                services.TryAddSingleton(typeof(IEFCacheServiceProvider), cacheOptions.CacheProvider);
            }

            if (cacheOptions.CacheAllQueriesOptions != null)
            {
                services.TryAddSingleton(Options.Create(cacheOptions.CacheAllQueriesOptions));
            }
        }
        private static void configOptions(IServiceCollection services, Action <EFCoreSecondLevelCacheOptions> options)
        {
            var cacheOptions = new EFCoreSecondLevelCacheOptions();

            options.Invoke(cacheOptions);

            if (cacheOptions.Settings.CacheProvider == null)
            {
                services.TryAddSingleton <IEFCacheServiceProvider, EFMemoryCacheServiceProvider>();
            }
            else
            {
                services.TryAddSingleton(typeof(IEFCacheServiceProvider), cacheOptions.Settings.CacheProvider);
            }

            services.TryAddSingleton(Options.Create(cacheOptions.Settings));
        }