I have a database-per-tenant Blazor server-side app (using Finbuckle.Multitenant host strategy) and I'm implementing distributed cache. So what I'm trying to do in Startup is the following:
services.AddTransient<CacheResolver>(_ => connectionString =>{ Action<SqlServerCacheOptions> cacheConfigOptions = options => { options.ConnectionString = connectionString; options.SchemaName = "dbo"; options.TableName = "Cache"; }; services.Configure(cacheConfigOptions); services.AddTransient<SqlServerCache>(); return sp => { using var scope = sp.CreateScope(); return scope.ServiceProvider.GetRequiredService<SqlServerCache>(); };});And I have also defined:
public delegate IDistributedCache CacheResolver(string key);However I'm getting 2 errors:
and
How can I fix the above errors?

