mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Add default server email rules in migration
This commit is contained in:
@@ -36,6 +36,7 @@ using BTCPayServer.Services.Wallets;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
@@ -454,6 +455,15 @@ namespace BTCPayServer
|
||||
return services;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddMigration<TDbContext, TMigration>(this IServiceCollection services)
|
||||
where TDbContext : DbContext
|
||||
where TMigration : MigrationBase<TDbContext>
|
||||
{
|
||||
services.TryAddSingleton<IMigrationExecutor, MigrationExecutor<TDbContext>>();
|
||||
services.TryAddSingleton<MigrationBase<TDbContext>, TMigration>();
|
||||
return services;
|
||||
}
|
||||
|
||||
public static async Task CloseSocket(this WebSocket webSocket)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user