Beispiel #1
0
        public QueueController(QueueBrokersContext context)
        {
            db = context;
            if (qo == null)
            {
                qo = new QueueOperations(db);
            }

            //if (!db.QueueBrokers.Any())
            //{
            //    //test adding
            //    db.QueueBrokers.Add(new QueueBroker { Function_Name = "rr", Function_Parameter = "23" });

            //    db.SaveChanges();
            //} else
            //{
            //    //delete all committed
            //    var committedOperations = db.QueueBrokers.Where(w => w.Execution_Status == true);
            //    db.QueueBrokers.RemoveRange(committedOperations);
            //    db.SaveChanges();
            //}
        }
Beispiel #2
0
 public QueueOperations(QueueBrokersContext context)
 {
     db = context;
 }