btcpayserver/BTCPayServer.Data/ApplicationDbContextFactory.cs

22 lines
671 B
C#
Raw Normal View History

using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
2020-06-28 10:55:27 +02:00
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
2017-09-13 08:47:34 +02:00
namespace BTCPayServer.Data
{
public class ApplicationDbContextFactory : BaseDbContextFactory<ApplicationDbContext>
{
public ApplicationDbContextFactory(IOptions<DatabaseOptions> options) : base(options, "")
2018-07-19 12:31:17 +02:00
{
}
public override ApplicationDbContext CreateContext()
{
var builder = new DbContextOptionsBuilder<ApplicationDbContext>();
ConfigureBuilder(builder);
return new ApplicationDbContext(builder.Options);
}
}
2017-09-13 08:47:34 +02:00
}