public static void CleanupErrorLog(Datastore db)
 {
     foreach (var el in db.From <ErrorLog>().Where("CN_Number != 0").Query())
     {
         if (db.GetRowCount(el.TableName, "WHERE rowID = @p1", el.CN_Number) == 0)
         {
             db.Delete(el);
         }
     }
 }
Exemple #2
0
        public static void Delete(Guid Id)
        {
            try
            {
                Datastore.Delete(DatastoreAisle, Id);
            }
            catch (Exception exception)
            {
                // LOG: LogDebug.ExceptionUnknown
                Logging.LogDebug(string.Format(SorentoLib.Strings.LogDebug.ExceptionUnknown, typeof(EventListener), exception.Message));

                // EXCEPTION: Exception.EventListenerDeleteGuid
                throw new Exception(string.Format(Strings.Exception.EventListenerDeleteGuid, Id.ToString()));
            }
        }