updated values controller

This commit is contained in:
Ashraful Haque 2021-02-23 15:19:04 +00:00
parent 3b3db72e3f
commit 5c28f84ea6
1 changed files with 14 additions and 0 deletions

View File

@ -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();
}
}
}
}