|
@@ -1,4 +1,6 @@
|
|
|
-using HaBookCms.AzureStorage.AzureTable.Implements;
|
|
|
+using HaBookCms.AzureStorage.AzureBlob.Implement;
|
|
|
+using HaBookCms.AzureStorage.AzureBlob.Interface;
|
|
|
+using HaBookCms.AzureStorage.AzureTable.Implements;
|
|
|
using HaBookCms.AzureStorage.AzureTable.Interfaces;
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
using System;
|
|
@@ -35,12 +37,23 @@ namespace HaBookCms.AzureStorage.ServiceExtension
|
|
|
/// <param name="builder"></param>
|
|
|
/// <param name="_connectionString"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static AzureStorageServiceBuilder AddConnection(this AzureStorageServiceBuilder builder, Action<AzureStorageOptions> databaseOptions)
|
|
|
+ public static AzureStorageServiceBuilder AddConnection(this AzureStorageServiceBuilder builder, AzureStorageOptions databaseOptions)
|
|
|
{
|
|
|
// AzureStorageOptions databaseOptions = new AzureStorageOptions();
|
|
|
// databaseOptions.ConnectionString = _connectionString;
|
|
|
builder.Services.AddSingleton(databaseOptions);
|
|
|
return builder;
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ ///
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="services"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static AzureStorageServiceBuilder AddAzureBlobStorage(this IServiceCollection services)
|
|
|
+ {
|
|
|
+ var builder = services.AddServerBuilder();
|
|
|
+ services.AddSingleton<IAzureBlobDBRepository, AzureBlobDBRepository>();
|
|
|
+ return builder;
|
|
|
+ }
|
|
|
}
|
|
|
}
|