Answer the question
In order to leave comments, you need to log in
How to properly configure routing in Web.API?
How to make two requests go through:
localhost:42648/api/values/Table_name(1)
localhost:42648/api/values/Table_name(1)/field?sel...
"Server error in application '/'.
Failed find this resource.
Answer the question
In order to leave comments, you need to log in
in WebApiConfig.cs we write:
config.Routes.MapHttpRoute(
name: "SafetyApi",
routeTemplate: "api/{controller}/{table}/{field}/{sortby}"
);
public async Task<IEnumerable<Table>> Get(string table, string field, string sortby)
{
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question