1
Dans mon ASP.NET MVC (6) Web APIs Web Je neWebAPI: Get api/enregistrement/id/Tags
[Produces("application/json")]
[Route("api/Record")]
public class RecordController : Controller
{
// ...
// GET: api/Record/5
[HttpGet("{id}", Name = "GetRecord")]
public async Task<Record> Get(string id)
{
var record = await repository.GetAsync<Record>(id);
return record;
}
Maintenant, mon Record
contient une Tags
.
Je voudrais revenir ces balises par api/Record/5/Tags
Comment devrais-je écrire mon action dans ce cas?
si un retour WebAPI retour JSON NotFound() ou Ok()? – Serge