diff --git a/src/Core/Services/NoopImplementations/NoopEventWriteService.cs b/src/Core/Services/NoopImplementations/NoopEventWriteService.cs new file mode 100644 index 0000000000..b0d79041ae --- /dev/null +++ b/src/Core/Services/NoopImplementations/NoopEventWriteService.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Bit.Core.Services +{ + public class NoopEventWriteService : IEventWriteService + { + public Task CreateAsync(ITableEntity entity) + { + return Task.FromResult(0); + } + + public Task CreateManyAsync(IList entities) + { + return Task.FromResult(0); + } + } +} diff --git a/src/Core/Utilities/ServiceCollectionExtensions.cs b/src/Core/Utilities/ServiceCollectionExtensions.cs index 82e1cdea88..511f12ec1f 100644 --- a/src/Core/Utilities/ServiceCollectionExtensions.cs +++ b/src/Core/Utilities/ServiceCollectionExtensions.cs @@ -105,14 +105,16 @@ namespace Bit.Core.Utilities if(!globalSettings.SelfHosted && CoreHelpers.SettingHasValue(globalSettings.Storage.ConnectionString)) { services.AddSingleton(); - services.AddSingleton(); + //services.AddSingleton(); } else { services.AddSingleton(); - services.AddSingleton(); + //services.AddSingleton(); } + services.AddSingleton(); + if(CoreHelpers.SettingHasValue(globalSettings.Attachment.ConnectionString)) { services.AddSingleton(); @@ -136,6 +138,7 @@ namespace Bit.Core.Utilities services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); } public static IdentityBuilder AddCustomIdentityServices(