zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.API/Extensions/Tenants/TenantMiddlewareExtensions.cs

16 lines
486 B
C#
Raw Normal View History

2023-12-05 09:22:48 +00:00
namespace ZeroFramework.DeviceCenter.API.Extensions.Tenants
{
public static class TenantMiddlewareExtensions
{
public static IServiceCollection AddTenantMiddleware(this IServiceCollection services)
{
return services.AddTransient<TenantMiddleware>();
}
public static IApplicationBuilder UseTenantMiddleware(this IApplicationBuilder builder)
{
return builder.UseMiddleware<TenantMiddleware>();
}
}
}