-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4565 from sbwalker/dev
fix #4562 - module template issue caused by gitignore
- Loading branch information
Showing
3 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
Oqtane.Server/wwwroot/Modules/Templates/External/Client/Startup/ClientStartup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Oqtane.Services; | ||
using [Owner].Module.[Module].Services; | ||
|
||
namespace [Owner].Module.[Module].Startup | ||
{ | ||
public class ClientStartup : IClientStartup | ||
{ | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
services.AddScoped<I[Module]Service, [Module]Service>(); | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Oqtane.Server/wwwroot/Modules/Templates/External/Server/Startup/ServerStartup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Oqtane.Infrastructure; | ||
using [Owner].Module.[Module].Repository; | ||
using [Owner].Module.[Module].Services; | ||
|
||
namespace [Owner].Module.[Module].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<I[Module]Service, Server[Module]Service>(); | ||
services.AddDbContextFactory<[Module]Context>(opt => { }, ServiceLifetime.Transient); | ||
} | ||
} | ||
} |