Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created November 23, 2020 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xximjasonxx/6a8c6b0b9bc83c945cbb6e0c63f66eac to your computer and use it in GitHub Desktop.
Save xximjasonxx/6a8c6b0b9bc83c945cbb6e0c63f66eac to your computer and use it in GitHub Desktop.
services.AddScoped<ContextServiceFactory>();
services.AddScoped<IContextReaderService>(p => p.GetService<ContextServiceFactory>().GetCurrentContext());
services.AddScoped<IContextWriterService>(p => p.GetService<ContextServiceFactory>().GetCurrentContext());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment