Код: Выделить всё
private void Context_EndRequest(object sender, EventArgs e)
{
var context = ((HttpApplication)sender).Context;
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
{
scope.Dispose();
}
}
: ошибка CS1026: ) ожидается: ошибка CS1002: ; ожидается: ошибка CS1513:
} ожидается
В линии
Код: Выделить всё
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
Подробнее здесь: https://stackoverflow.com/questions/574 ... 3-expected