Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use StorageConnectionString in Startup.cs #2

Closed
prinkpan opened this issue Sep 3, 2020 · 0 comments
Closed

Use StorageConnectionString in Startup.cs #2

prinkpan opened this issue Sep 3, 2020 · 0 comments

Comments

@prinkpan
Copy link

prinkpan commented Sep 3, 2020

The Startup.cs file under AspNetCoreMultitenant.Web uses the following code:

services.AddScoped<IFileClient>(service =>
{
	var provider = service.GetRequiredService<ITenantProvider>();
	var tenant = provider.GetTenant();

	if(tenant.StorageType == "GoogleDrive")
	{
		return new GoogleDriveFileClient(tenant.ConnectionString);
	}

	if(tenant.StorageType == "AzureBlob")
	{
		return new AzureBlobStorageFileClient(tenant.ConnectionString);
	}

	return null;
});

The code should be return new GoogleDriveFileClient(tenant.StorageConnectionString); and return new AzureBlobStorageFileClient(tenant.StorageConnectionString);

@prinkpan prinkpan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant