//To Update Category Item
 public async Task <UrlApiHealthCheck> UpdateUrlApiHealthCheck(UrlApiHealthCheck urlApibHealthCheck)
 {
     try
     {
         using (SystemHealthChecksDbContext shc = new SystemHealthChecksDbContext())
         {
             shc.Update(urlApibHealthCheck);
             return(await Task.FromResult((shc.SaveChanges() > 0 ? urlApibHealthCheck : new UrlApiHealthCheck())));
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Beispiel #2
0
 //To Update Category Item
 public async Task <DatabaseHealthCheck> UpdateHealthCheckCategory(DatabaseHealthCheck dbHealthCheck)
 {
     try
     {
         using (SystemHealthChecksDbContext shc = new SystemHealthChecksDbContext())
         {
             shc.Update(dbHealthCheck);
             return(await Task.FromResult((shc.SaveChanges() > 0 ? dbHealthCheck : new DatabaseHealthCheck())));
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }