diff --git a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs index 6b6ea90..4135599 100644 --- a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs @@ -48,11 +48,7 @@ namespace EventHub.EntityFrameworkCore }); /* Registering the payment dbcontext and replacing the module's dbcontext */ - context.Services.AddAbpDbContext(options => - { - options.ReplaceDbContext(); - options.AddDefaultRepositories(); - }); + context.Services.AddAbpDbContext(); Configure(options => { diff --git a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/Payment/EventHubPaymentDbContext.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/Payment/EventHubPaymentDbContext.cs index a97cb02..5fb930d 100644 --- a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/Payment/EventHubPaymentDbContext.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/Payment/EventHubPaymentDbContext.cs @@ -3,10 +3,12 @@ using Payment; using Payment.EntityFrameworkCore; using Payment.PaymentRequests; using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; using Volo.Abp.EntityFrameworkCore; namespace EventHub.EntityFrameworkCore.Payment { + [ReplaceDbContext(typeof(IPaymentDbContext))] [ConnectionStringName(PaymentDbProperties.ConnectionStringName)] public class EventHubPaymentDbContext : AbpDbContext, IPaymentDbContext {