Is there a convention for naming methods in a C#.Net REST API server?

Viewed 30

My API provides for listing all items in a resource and getting a single item by ID. Roughly:

[HttpGet(Name="GetItems")]
public async Task<IActionResult<IEnumerable<Item>>> GetItems()
{
}

[HttpGet("{id}", Name="GetItem")]
public async Task<IActionResult<Item>> GetItem(int id)
{
}

but I worry that GetItems() and GetItem() are too similar. Would ListItems() and GetItem() be better? Is there a standard or convention? I've googled around for 15 minutes and not found anything.

TIA.

0 Answers
Related