-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update MVC to use routing required values for endpoints #8731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less code, more good
src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointDataSource.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Mvc.Core/Routing/MvcEndpointDataSource.cs
Outdated
Show resolved
Hide resolved
@@ -12,8 +12,8 @@ | |||
<body> | |||
<h1 style="font-family: cursive;">ASP.NET vNext - About</h1> | |||
<p>| <a href="/" style="background-color: gray;color: white;border-radius: 3px;border: 1px solid black;padding: 3px;font-family: cursive;">My Home</a> | |||
| <a href="/Home/About" style="background-color: gray;color: white;border-radius: 3px;border: 1px solid black;padding: 3px;font-family: cursive;">My About</a> | |||
| <a href="/Home/Help" style="background-color: gray;color: white;border-radius: 3px;border: 1px solid black;padding: 3px;font-family: cursive;">My Help</a> |</p> | |||
| <a href="/home/about" style="background-color: gray;color: white;border-radius: 3px;border: 1px solid black;padding: 3px;font-family: cursive;">My About</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is actually going back to 2.1 behavior
Builds and tests locally. Unable to complete at the moment without a feature branch build. |
@@ -5,6 +5,7 @@ | |||
<RestoreSources>$(DotNetRestoreSources)</RestoreSources> | |||
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' "> | |||
$(RestoreSources); | |||
C:\Development\Source\Routing\artifacts\build; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhhhhhh
defaults[kvp.Key] = kvp.Value; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I think we came up with a better design 😁
}); | ||
} | ||
//[Fact] | ||
//public void Endpoints_AttributeRoutes_ActionMetadataDoesNotOverrideDataSourceMetadata() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this still be commented out ???
@@ -323,7 +323,7 @@ public async Task PagesInAreas_CanGenerateLinksToControllersAndPages() | |||
var expected = | |||
@"<a href=""/Accounts/Manage/RenderPartials"">Link inside area</a> | |||
<a href=""/Products/List/old/20"">Link to external area</a> | |||
<a href=""/Accounts"">Link to area action</a> | |||
<a href="""">Link to area action</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to change to the test code to be successful, or even better skip the test and link to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few things here that I think need to be addressed.
Replaced with PR on aspnetcore |
Exploring what MVC code would look like when consuming RoutePatternTransformer.
Neither tests or routing are updated yet so everything will fail.