38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Identity;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Oqtane.Infrastructure;
|
|
using System;
|
|
using SZUAbsolventenverein.Module.AdminModules.Repository;
|
|
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.Configure<DataProtectionTokenProviderOptions>(options =>
|
|
{
|
|
options.TokenLifespan = TimeSpan.FromDays(14);
|
|
});
|
|
|
|
services.AddTransient<IAdminModulesService, ServerAdminModulesService>();
|
|
services.AddTransient<IAdminSettingsService, ServerAdminSettingsService>();
|
|
services.AddDbContextFactory<AdminModulesContext>(opt => { }, ServiceLifetime.Transient);
|
|
}
|
|
}
|
|
}
|