How to implement a UserFactory using IHttpContextAccessor
问题 I used to have a UserFactory (before vNext) that used HttpContext.Current but since that is now gone I am having trouble recreating it. I want it to be a static class that sets and gets the current user to access user data throughout the application. I know I must use the DI system but not sure how. Code so far: public class CurrentContext : IHttpContextAccessor { private IHttpContextAccessor ctx; public HttpContext HttpContext { get { return ctx.HttpContext; } set { ctx.HttpContext = value;