Skip to content

Instantly share code, notes, and snippets.

@mvodep
Last active March 2, 2019 07:57
Show Gist options
  • Save mvodep/be05d682fb090b67ee42 to your computer and use it in GitHub Desktop.
Save mvodep/be05d682fb090b67ee42 to your computer and use it in GitHub Desktop.
public class HelloWorldController : ApiController
{
public IEnumerable<string> Get()
{
return new[] { "hello", "world" };
}
// [Route("api/{controller}/{id}")]
// [HttpGet]
public string Get(int id)
{
return "hello world";
}
public void Post([FromBody]string value)
{ }
public void Put(int id, [FromBody]string value)
{ }
public void Delete(int id)
{ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment