forked from xiongyuxing/tiku-backend.net
18 lines
596 B
C#
18 lines
596 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Tiku.Application.Security;
|
|
|
|
namespace Tiku.Application;
|
|
|
|
public static class DependencyInjection
|
|
{
|
|
public static IServiceCollection AddApplication(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<ICurrentUser, CurrentUser>();
|
|
services.AddScoped<TenantContext>();
|
|
services.AddScoped<ITenantContext>(provider => provider.GetRequiredService<TenantContext>());
|
|
services.AddScoped<ITenantContextInitializer>(provider => provider.GetRequiredService<TenantContext>());
|
|
|
|
return services;
|
|
}
|
|
}
|