mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
179520a211
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
13 lines
399 B
C#
13 lines
399 B
C#
using BTCPayServer.Abstractions.Contracts;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace BTCPayServer.Abstractions.Extensions
|
|
{
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddStartupTask<T>(this IServiceCollection services)
|
|
where T : class, IStartupTask
|
|
=> services.AddTransient<IStartupTask, T>();
|
|
}
|
|
}
|