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; } }
public bool save() { return(_NLH.SaveChanges() > 0); }