Exemple #1
0
 /// <summary>
 /// Purge all Violation Codes from the System
 /// </summary>
 public static void Purge()
 {
     using (var context = new AdministrationDbContext())
     {
         var count = context.DeleteAll <ViolationCode>();
         if (count > 0)
         {
             Log.Info("Purged {0} Violation Codes", count);
         }
         count = context.DeleteAll <UcrCode>();
         if (count > 0)
         {
             Log.Info("Purged {0} UCR Codes", count);
         }
         context.SaveChanges();
     }
 }
Exemple #2
0
 /// <summary>
 /// Purge all ImageInfo Codes from the System
 /// </summary>
 public static void Purge()
 {
     using (var context = new AdministrationDbContext())
     {
         var count = context.DeleteAll <ImageInfo>();
         if (count > 0)
         {
             Log.Info("Purged {0} ImageInfo Codes", count);
         }
         context.SaveChanges();
     }
 }