updated values controller
This commit is contained in:
parent
3b3db72e3f
commit
5c28f84ea6
|
|
@ -22,5 +22,19 @@ namespace TestApplication.Controllers
|
|||
{
|
||||
return await _context.Values.ToListAsync();
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
public async Task<ActionResult<Values>> GetValues_ById(int id)
|
||||
{
|
||||
var values = await _context.Values.FindAsync(id);
|
||||
if(values != null)
|
||||
{
|
||||
return values;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue