Esempio n. 1
0
 public JsonResult DeleteMonitorResult(int id)
 {
     try
     {
         var del = _dbContext.Monitor.Where(p => p.Id == id);
         _dbContext.RemoveRange(del);
         _dbContext.SaveChanges();
         return(new JsonResult(new Response("OK", 0)));
     }
     catch (Exception e)
     {
         return(new JsonResult(new Response(e.Message, 1)));
     }
 }