using BTCPayServer.Abstractions.Contracts; using BTCPayServer.Abstractions.Models; using Laraue.EfCoreTriggers.PostgreSql.Extensions; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Options; namespace BTCPayServer.Plugins.MicroNode; public class MicroNodeContextFactory : BaseDbContextFactory { public MicroNodeContextFactory(IOptions options) : base(options, "BTCPayServer.Plugins.MicroNode") { } public override MicroNodeContext CreateContext() { var builder = new DbContextOptionsBuilder(); ConfigureBuilder(builder); builder.UsePostgreSqlTriggers(); return new MicroNodeContext(builder.Options); } }