Switch the Locations Api event store to in-memory storage because CAP requires MongoDB version to be larger than 4.0 and enable clustering to use the local storage transaction provided by MongoDB

This commit is contained in:
Savorboard 2019-03-14 16:04:41 +08:00
parent 384119eef4
commit f7b0ddd56c

View File

@ -53,12 +53,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
services.AddCap(options => services.AddCap(options =>
{ {
// using MongoDB as the event storage options.UseInMemoryStorage();
options.UseMongoDB(configure =>
{
configure.DatabaseConnection = Configuration["ConnectionString"];
configure.DatabaseName= Configuration["Database"];
});
if (Configuration.GetValue<bool>("AzureServiceBusEnabled")) if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
{ {