Ambiguous Map method with Minimal
See original GitHub issueProposed API
Add a new Map overload to remove ambiguity caused by implicit conversion from PathString
:
namespace Microsoft.AspNetCore.Builder
{
public static class MapExtensions
{
+ public static IApplicationBuilder Map(this IApplicationBuilder app, string pathMatch, Action<IApplicationBuilder> configuration)
Original Issue
When using minimal there is ambiguity when using app.Map("/", builder => {});
between IApplicationBuilder Map(this IApplicationBuilder app, PathString pathMatch, Action<IApplicationBuilder> configuration)
https://github.com/dotnet/aspnetcore/blob/ff51fd7105a9003841215f1f3b0b8fc9e2998a67/src/Http/Http.Abstractions/src/Extensions/MapExtensions.cs#L23
and public static MinimalActionEndpointConventionBuilder Map(this IEndpointRouteBuilder endpoints, string pattern, Delegate action)
https://github.com/dotnet/aspnetcore/blob/ff51fd7105a9003841215f1f3b0b8fc9e2998a67/src/Http/Routing/src/Builder/MinimalActionEndpointRouteBuilderExtensions.cs#L123
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
java - Mapstruct: Ambiguous mapping methods found for ...
It seems like there are new methods added in Spring Data that can be used to map from Short to TypeB and thus...
Read more >What is Ambiguous Mapping in Spring?
Spring is a loosely coupled framework of java meaning all the objects are not dependent on each other and can be easily managed...
Read more >Country Mapping shows as ambiguous for odd countries.
Country Mapping shows as ambiguous for odd countries. I've set the Country to use the ISO standard but I still get ambiguous for...
Read more >Frequently Asked Questions (FAQ)
MapStruct reports this as “ambiguous mapping method” and lists the methods from which it cannot make a selection. Here, you have to guide...
Read more >METHODS FOR ALLOCATING AMBIGUOUS SHORT- ...
First, they align their reads to the reference genome, using parameters which return an exact best match, if one exists, or a list...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I filed an issue here https://github.com/dotnet/roslyn/issues/55691
I reopened https://github.com/dotnet/roslyn/issues/55691 because there’s still some weirdness there if you specify
IApplicationBuilder
as the parameter type in the lambda, but I think the main scenario where the parameter type is unspecified (or specified to be anything other thanIApplicationBuilder
) is addressed, so I’ll leave this closed.