private void Context_EndRequest(object sender, EventArgs e)
{
var context = ((HttpApplication)sender).Context;
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
{
scope.Dispose();
}
}
When I try to build my project (Framework 4.7.2) I am getting the
: error CS1026: ) expected : error CS1002: ; expected : error CS1513: } expected
On the line
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
But I don't see where it's throwing the error.