Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WebApiConfig
- config.Routes.MapHttpRoute(
- name: "person",
- routeTemplate: "person/{firstName}/{lastName}",
- defaults: new { controller = "Person", action = "GetPerson" });
- public HttpResponseMessage GetPerson(Person person)
- {
- // person always null here
- //DO STUFF!
- }
- public class Person
- {
- public string FirstName { get; set; }
- public string LastName { get; set; }
- }
Add Comment
Please, Sign In to add comment