The current docs on ASP.NET dependency injection describe an AddScoped
method, which I also see as a member of IServiceCollection
in Visual Studio's autocompletion when working on an ASP.NET project.
However, there are also many references on the internet (including on the MSDN blog) to an AddScope
method which doesn't seem to be referenced in the official docs and doesn't show up for me in Visual Studio. Examples: 1, 2, 3. In fact, a Google search for asp.net "addscope"
turns up roughly the same number of results as asp.net "addscoped"
; these two names are used roughly equally often.
It would seem incredible if all of these references were just typos - surely this method name doesn't get typoed almost 50% of time consistently across the entire internet? But that makes it all the more confusing that I can't find any reference to AddScope
in any official documentation. Was this a method that used to exist, or an old alias for AddScoped
, or is something else going on here? What exactly is or was AddScope
?