Add [Module]ServerStartup.cs to Module Template
This commit is contained in:
parent
1d9f970169
commit
75a6111a9b
26
Oqtane.Server/wwwroot/Modules/Templates/External/Server/Startup/[Module]ServerStartup.cs
vendored
Normal file
26
Oqtane.Server/wwwroot/Modules/Templates/External/Server/Startup/[Module]ServerStartup.cs
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Oqtane.Infrastructure;
|
||||
using [Owner].Module.[Module].Repository;
|
||||
|
||||
namespace [Owner].Module.[Module].Startup
|
||||
{
|
||||
public class [Module]ServerStartup : IServerStartup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
// not implemented
|
||||
}
|
||||
|
||||
public void ConfigureMvc(IMvcBuilder mvcBuilder)
|
||||
{
|
||||
// not implemented
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddDbContextFactory<[Module]Context>(opt => { }, ServiceLifetime.Transient);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user