Hi Ed Friesema,
Thank you for reaching out to Microsoft Q & A forum.
In my experience with this exercise, I did not encounter any issues even without explicitly adding the @using BlazingPizza.Services directive before @inject OrderState OrderState. This is likely because the project we are working on has global usings enabled. Introduced in .NET 6, global usings automatically include common namespaces—such as BlazingPizza.Services—throughout the project, eliminating the need for manual @using declarations.
Although it is generally considered good practice to include the @using directive for the sake of clarity, it is not strictly necessary in this case due to the presence of global usings. If you do encounter issues in other environments or projects that do not have global usings enabled, adding the directive manually should resolve the problem.
Screenshot for your reference:
Please feel free to contact us if you have any additional questions.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.