optimize client startup in templates

This commit is contained in:
sbwalker
2025-08-27 12:20:59 -04:00
parent 581f14e661
commit 7cf9d9ad65
2 changed files with 8 additions and 2 deletions

View File

@ -7,8 +7,11 @@ namespace Oqtane.Application.Startup
public class ClientStartup : IClientStartup
{
public void ConfigureServices(IServiceCollection services)
{
if (!services.Any(s => s.ServiceType == typeof(IMyModuleService)))
{
services.AddScoped<IMyModuleService, MyModuleService>();
}
}
}
}

View File

@ -7,8 +7,11 @@ namespace [Owner].Module.[Module].Startup
public class ClientStartup : IClientStartup
{
public void ConfigureServices(IServiceCollection services)
{
if (!services.Any(s => s.ServiceType == typeof(I[Module]Service)))
{
services.AddScoped<I[Module]Service, [Module]Service>();
}
}
}
}