0

When I use a basic template

 serialNumberGroup.MapGet("{id}",async (....
 var link=linkGenerator.GetUriByName(contextAccessor.HttpContext, "GetSerialNumber", new {id}); 

The value of link would be the correct.

However if I use constrainst in the template

 serialNumberGroup.MapGet("{id:required:alpha:length(1,50)}", async (....

 var link=linkGenerator.GetUriByName(contextAccessor.HttpContext, "GetSerialNumber", new {id}); 

The value of link would be the null.

I have looked in the options to see if there were any settings to adjust the behavior.

0 Answers0