Skip to content

change 'ValuesController' to 'ValueController' #47474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2023
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