Esempio n. 1
0
 public IActionResult Update([FromBody] DataLayer.Models.CovidTestJson model)
 {
     _context.SaveError("Entering Update", "");
     try
     {
         CovidTest.AddCovidRecord(_context, model);
     }
     catch (Exception ex)
     {
         _context.SaveError("In Update", ex.Message);
         return(BadRequest(ex.Message));
     }
     return(Ok("Success"));
 }
Esempio n. 2
0
 public IActionResult Get(int id)
 {
     DataLayer.Models.CovidTestJson model = CovidTest.GetCovidRecord(_context, id);
     return(Ok(model));
 }