mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 07:34:24 +01:00
micronode
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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<MicroNodeContext>
|
||||
{
|
||||
public MicroNodeContextFactory(IOptions<DatabaseOptions> options) : base(options, "BTCPayServer.Plugins.MicroNode")
|
||||
{
|
||||
}
|
||||
|
||||
public override MicroNodeContext CreateContext()
|
||||
{
|
||||
var builder = new DbContextOptionsBuilder<MicroNodeContext>();
|
||||
ConfigureBuilder(builder);
|
||||
builder.UsePostgreSqlTriggers();
|
||||
|
||||
return new MicroNodeContext(builder.Options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user