Skip to content
Kahne Raja edited this page Aug 10, 2014 · 5 revisions

Why is my controller not showing up?

This project relies on Attribute Routing.

Add a [RoutePrefix("api/[name]")] to your controller.

Why are my controller actions not showing up?

This project relies on Attribute Routing.

Add a [Route("{id}")] to your controller.

Why is my action behaving like a POST when it should be a GET?

This project relies on Attribute Http Methods.

Use the [HttpGet], [HttpPost], [HttpPut], [HttpDelete] attributes as required.

Why are my parameters not showing up?

2 reasons.

  • You need to use Parameter Attributes. [FromUri] or [FromBody].
  • You need the /// comments to be created with the correct set of parameters. This should auto populate if you just type "///" above the method (action) signature.