25 lines
765 B
C#
25 lines
765 B
C#
using Bunny.Service.BackgroundModule;
|
|
using Bunny.Service.IService;
|
|
using Bunny.Service.IService.Service;
|
|
using Bunny.WebApi.Controllers.Base;
|
|
|
|
namespace Bunny.WebApi.Config;
|
|
|
|
public static class ServiceRegistration
|
|
{
|
|
public static void AddApplicationServices(this WebApplicationBuilder builder)
|
|
{
|
|
builder.Services.AddScoped<TemplateController>();
|
|
builder.Services.AddScoped<IBaseService, BaseService>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 注入后台服务相关
|
|
/// </summary>
|
|
/// <param name="builder"></param>
|
|
public static void AddApplicationBackendServices(this WebApplicationBuilder builder)
|
|
{
|
|
// 测试注入后台服务
|
|
// builder.Services.AddHostedService<TemplateBackgroundModule>();
|
|
}
|
|
} |