private static void ApplyCachingProvider(CachingProviderType cachingProvider, RepositoryOptionsBuilder builder) { switch (cachingProvider) { case CachingProviderType.MicrosoftInMemory: { builder.UseInMemoryCache(); break; } case CachingProviderType.Redis: { builder.UseRedis(options => { options .WithEndPoint("localhost") .WithDefaultDatabase(0); }); break; } #if NETFULL case CachingProviderType.Memcached: { builder.UseMemcached(options => { options.WithEndPoint("127.0.0.1", 11211); }); break; } #endif case CachingProviderType.Couchbase: { builder.UseCouchbase(options => { options .WithEndPoint("http://localhost:8091") .WithBucketName("default") .WithUsername("default") .WithPassword("password"); }); break; } default: throw new ArgumentOutOfRangeException(nameof(cachingProvider)); } }