2021-05-05 14:09:05 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
using ASC.Core;
|
|
|
|
|
using ASC.Core.Common.Settings;
|
|
|
|
|
using ASC.CRM.Core.Dao;
|
|
|
|
|
using ASC.CRM.Core.EF;
|
|
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
|
|
|
|
|
namespace ASC.CRM.HttpHandlers
|
|
|
|
|
{
|
|
|
|
|
public class TenantConfigureMiddleware
|
|
|
|
|
{
|
|
|
|
|
private readonly RequestDelegate _next;
|
|
|
|
|
|
|
|
|
|
public TenantConfigureMiddleware(RequestDelegate next)
|
|
|
|
|
{
|
|
|
|
|
_next = next;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task InvokeAsync(HttpContext context,
|
|
|
|
|
DaoFactory daoFactory,
|
|
|
|
|
SettingsManager settingsManager,
|
|
|
|
|
CoreConfiguration coreConfiguration)
|
2021-06-04 14:38:42 +00:00
|
|
|
|
{
|
2021-05-05 14:09:05 +00:00
|
|
|
|
CrmDbContextSeed.SeedInitPortalData(settingsManager, daoFactory, coreConfiguration);
|
|
|
|
|
|
|
|
|
|
await _next.Invoke(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|