Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Update MVC to use routing required values for endpoints #8731

Closed
wants to merge 9 commits into from

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Nov 16, 2018

Exploring what MVC code would look like when consuming RoutePatternTransformer.

Neither tests or routing are updated yet so everything will fail.

@JamesNK JamesNK requested a review from rynowak November 16, 2018 04:41
Copy link
Member Author

@JamesNK JamesNK left a 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

@@ -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>
Copy link
Member Author

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

@JamesNK JamesNK changed the title [WIP] Update MVC to use routing required values for endpoints Update MVC to use routing required values for endpoints Nov 21, 2018
@JamesNK
Copy link
Member Author

JamesNK commented Nov 21, 2018

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;
Copy link
Member

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;
}
}
}
Copy link
Member

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()
Copy link
Member

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>
Copy link
Member

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.

Copy link
Member

@rynowak rynowak left a 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.

@JamesNK
Copy link
Member Author

JamesNK commented Nov 29, 2018

Replaced with PR on aspnetcore

@JamesNK JamesNK closed this Nov 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants