Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
BionStt committed Jan 1, 2022
1 parent 5607933 commit 91dec1e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ModularMonolithOutBoxPattern.MVC/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@



builder.Services.AddHostedService<OutBoxWorker>();
//builder.Services.AddHostedService<OutBoxWorker>(); //pindah kedalam module


builder.Services.AddControllersWithViews().AddNewtonsoftJson(x =>
Expand Down
2 changes: 1 addition & 1 deletion ModularMonolithOutBoxPattern.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DDD", "DDD\DDD.csproj", "{7
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationEvent", "IntegrationEvent\IntegrationEvent.csproj", "{DEBE71CD-1282-4429-A7D3-9B03D9360245}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventBus", "EventBus\EventBus.csproj", "{6F8EE448-09E4-486E-9AD0-AA2D0708626E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus", "EventBus\EventBus.csproj", "{6F8EE448-09E4-486E-9AD0-AA2D0708626E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
3 changes: 3 additions & 0 deletions Outbox/ServiceCollection.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Outbox.Infrastructure.Context;
using Outbox.WorkerProcess;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -14,6 +15,8 @@ public static class ServiceCollection
public static IServiceCollection AddOutBoxModule(this IServiceCollection services, string connectionString)
{
services.AddDbContext<OutboxDbContext>(options => options.UseSqlServer(connectionString));
services.AddHostedService<OutBoxWorker>();

return services;
}
}
Expand Down
12 changes: 6 additions & 6 deletions SalesMarketing/Infrastructure/EventBus/SalesMarketingEventBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

namespace SalesMarketing.Infrastructure.EventBus
{
public class SalesMarketingEventBus : InMemoryEventBus, ISalesMarketingEventBus
{
public SalesMarketingEventBus(OutboxDbContext dbContext) : base(dbContext)
{
}
}
//public class SalesMarketingEventBus : InMemoryEventBus, ISalesMarketingEventBus
//{
// public SalesMarketingEventBus(OutboxDbContext dbContext) : base(dbContext)
// {
// }
//}
}
2 changes: 1 addition & 1 deletion SalesMarketing/ServiceCollectionExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static IServiceCollection AddSalesMarketingModule(this IServiceCollection



services.AddScoped<ISalesMarketingEventBus, SalesMarketingEventBus>();
// services.AddScoped<ISalesMarketingEventBus, SalesMarketingEventBus>();

return services;

Expand Down

0 comments on commit 91dec1e

Please sign in to comment.