40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Identity;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Options;
|
|
using Oqtane.Infrastructure;
|
|
using System;
|
|
using SZUAbsolventenverein.Module.AdminModules.Models;
|
|
using SZUAbsolventenverein.Module.AdminModules.Repository;
|
|
using SZUAbsolventenverein.Module.AdminModules.Server.Startup;
|
|
using SZUAbsolventenverein.Module.AdminModules.Services;
|
|
using SZUAbsolventenverein.Module.AdminSettings.Services;
|
|
|
|
namespace SZUAbsolventenverein.Module.AdminModules.Startup
|
|
{
|
|
public class ServerStartup : IServerStartup
|
|
{
|
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
|
{
|
|
// not implemented
|
|
}
|
|
|
|
public void ConfigureMvc(IMvcBuilder mvcBuilder)
|
|
{
|
|
// not implemented
|
|
}
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddTransient<IAdminModulesService, ServerAdminModulesService>();
|
|
services.AddTransient<IAdminSettingsService, ServerAdminSettingsService>();
|
|
services.AddDbContextFactory<AdminModulesContext>(opt => { }, ServiceLifetime.Transient);
|
|
|
|
services.AddTransient<IConfigureOptions<DataProtectionTokenProviderOptions>,
|
|
ConfigureDataProtectionTokenProviderOptions>();
|
|
}
|
|
}
|
|
}
|