Beispiel #1
0
 public void QueueTask(IHousekeepingTask task)
 {
     try
     {
         if (task == null)
         {
             return;
         }
         using (var context = new DatastoreEntities(ConfigHelper.ConnectionString))
         {
             var newItem = new EFDAL.Entity.Housekeeping
             {
                 Data = ServerUtilities.SerializeObject(task),
                 Type = (int)task.Type,
             };
             context.AddItem(newItem);
             context.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         LoggerCQ.LogError(ex);
     }
 }