Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@ namespace MyApp.Namespace
[Route("api/[controller]")]
[ApiController]
#if NameIsController
public class ValuesController : Microsoft.AspNetCore.Mvc.ControllerBase
public class ValueController : Microsoft.AspNetCore.Mvc.ControllerBase
#else
public class ValuesController : ControllerBase
public class ValueController : ControllerBase
#endif
{
#if(actions)
// GET: api/<ValuesController>
// GET: api/<ValueController>
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}

// GET api/<ValuesController>/5
// GET api/<ValueController>/5
[HttpGet("{id}")]
public string Get(int id)
{
return "value";
}

// POST api/<ValuesController>
// POST api/<ValueController>
[HttpPost]
public void Post([FromBody] string value)
{
}

// PUT api/<ValuesController>/5
// PUT api/<ValueController>/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}

// DELETE api/<ValuesController>/5
// DELETE api/<ValueController>/5
[HttpDelete("{id}")]
public void Delete(int id)
{
Expand Down