gautema / CQRSlite

A lightweight framework to help creating CQRS and Eventsourcing applications in C#
Other
1.1k stars 266 forks source link

Request scope objects are acting like singleton .Net Core 2.1 #77

Closed entith closed 6 years ago

entith commented 6 years ago

The fix for issue #50 is no longer sufficient in ASP.NET Core 2.1.

It looks like IHttpContextAccessor is no longer registered with the DI container by default because maintaining [its] state has non-trivial performance costs":

Quick fix is to register it manually:

services.AddHttpContextAccessor();