Skip to content

Instantly share code, notes, and snippets.

@stevetalkscode
Created October 19, 2020 06:26
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 stevetalkscode/dab2c92a091c88e1e85edf340e4cf153 to your computer and use it in GitHub Desktop.
Save stevetalkscode/dab2c92a091c88e1e85edf340e4cf153 to your computer and use it in GitHub Desktop.
services.TryAddTransient(provider => provider.GetRequiredService<UserAccessor>().GetUser());
services.AddSingleton<GetCurrentUserDelegate>(provider => provider.GetRequiredService<IUser>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment