Skip to content

Instantly share code, notes, and snippets.

@jbogard
Created January 17, 2018 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbogard/a08e8301dad006c026335d4176453067 to your computer and use it in GitHub Desktop.
Save jbogard/a08e8301dad006c026335d4176453067 to your computer and use it in GitHub Desktop.
public bool Matches(RouteData routeData, string httpMethod) =>
HttpMethods.IsGet(httpMethod)
&& string.Equals((string)routeData.Values["controller"],
"orders", StringComparison.OrdinalIgnoreCase)
&& routeData.Values.ContainsKey("id");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment