title: How will I enqueue an object before or after i save it to the database?
body: <p>I'm creating a Queue Management system right now in ASP.NET MVC</p>
  
  <p>1st scenario:<br>
  customer will go to a laptop, enter their name and then confirm to receive the queue number, then the data will be save to the database.<br>
  My question is how and where will I enqueue them? so that I can dequeue them later when the agent call them?</p>
  
  <p>KiosksController:</p>
  
  <pre><code>public static Queue&lt;Queue&gt; todayQueue = new Queue&lt;Queue&gt;();
  public ActionResult SetQueueInfo([Bind(Include = "QueueId,Name,QueueNumber,ServiceId,ServiceName,ServiceLetter")] Queue queue, int? id)
          {
              if (ModelState.IsValid)
              {
                  db.Queues.Add(queue);
                  db.SaveChanges();
                  return View(queue);
              }
              return View();
          }
  </code></pre>
  
  <p>2nd Scenario the Agent will click next then it will serve the next customer First in First out.<br>
  How can I dequeue them? here is my button of "Finish" </p>
  
  <p>TellerScreenController  </p>
  
  <pre><code>public static Queue&lt;QueueTable&gt; todayQueue;
  
      public ActionResult BtnNext()
      {
          var first = todayQueue.Dequeue();
  
          return RedirectToAction("Index");
      }
  </code></pre>