Exemple #1
0
 protected bool Save()
 {
     try
     {
         return(_context.SaveChanges() > 0 ? true : false);
     }
     catch (Exception e)
     {
         _context.ErrorLogs.Add(new ErrorLog
         {
             ErrorDetail   = e.ToString(),
             ErrorLocation = "Repository Save method"
         });
         _context.SaveChanges();
         return(false);
     }
 }