aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/DatabaseManagement/MigationServiceCollectionExtensions.cs
blob: d1f9b51c76a57fefb268ad2d62a21b4dd381e504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using Microsoft.Extensions.DependencyInjection;

namespace Timeline.Services.DatabaseManagement
{
    public static class DatabaseManagementServiceCollectionExtensions
    {
        public static IServiceCollection AddDatabaseManagementService(this IServiceCollection services)
        {
            services.AddScoped<IDatabaseCustomMigrator, DatabaseCustomMigrator>();
            services.AddScoped<IDatabaseCustomMigration, TimelinePostContentToDataMigration>();
            services.AddScoped<IDatabaseBackupService, DatabaseBackupService>();
            services.AddHostedService<DatabaseManagementService>();
            return services;
        }
    }
}