Unused route parameter (ASP0018)
هذا المحتوى غير متوفر بلغتك بعد.
Key dotnet.api.unused-route-parameter · Severity info · Category api
ASP.NET Core analyzer ASP0018. Flags a route parameter the handler or action never binds - either a typo in one of the two names or a segment that should not be a parameter.
Incorrect
Section titled “Incorrect”app.MapGet("/customers/{customerId}/orders", () => List());Correct
Section titled “Correct”app.MapGet("/customers/{customerId}/orders", (int customerId) => List(customerId));