示例#1
0
 public Message Add(Faild_Log item)
 {
     try
     {
         _context.Faild_Logs.Add(item);
         _context.SaveChanges();
         return(Message.Success);
     }
     catch (DbUpdateException ex)
     {
         Microsoft.Data.Sqlite.SqliteException sqliteEX = ex.GetBaseException() as Microsoft.Data.Sqlite.SqliteException;
         int ErrorCode = sqliteEX.SqliteErrorCode;
         return(Message.unKnow);
     }
 }
示例#2
0
 public Message Remove(Faild_Log item)
 {
     try
     {
         _context.Entry(item).State = EntityState.Deleted;
         _context.SaveChanges();
         return(Message.Success);
     }
     catch (DbUpdateException)
     {
         return(Message.ErrorInRemove);
     }
     catch (Exception)
     {
         return(Message.ErrorInRemove);
     }
 }
示例#3
0
 public Message Update(Faild_Log item)
 {
     throw new NotImplementedException();
 }