Example #1
0
 public int SaveChanges()
 {
     try
     {
         return(nHL.SaveChanges());
     }
     catch (DbUpdateConcurrencyException ex)
     {
         //A concurrency error occurred
         //Should handle intelligently
         Console.WriteLine(ex);
         throw;
     }
     catch (RetryLimitExceededException ex)
     {
         //DbResiliency retry limit exceeded
         //Should handle intelligently
         Console.WriteLine(ex);
         throw;
     }
     catch (Exception ex)
     {
         //Should handle intelligently
         Console.WriteLine(ex);
         throw;
     }
 }
Example #2
0
 public bool save()
 {
     return(_NLH.SaveChanges() > 0);
 }