public void CreatePackingNotes(IEnumerable <OrderLine> orderLines)
        {
            if (orderLines.Count() != 0)
            {
                PackingNote packingNote = new PackingNote()
                {
                    CreationDate      = DateTime.Now,
                    PackingNoteNumber = NextNumber(),
                    Status            = "Rozpoczęte"
                };
                AddPackingNote(packingNote);

                for (int i = 0; i < orderLines.Count(); i++)
                {
                    Console.WriteLine("CREATREING: " + i);
                    PackingNoteLine pnl = null;
                    pnl = new PackingNoteLine()
                    {
                        Amount      = orderLines.ToList()[i].Amount,
                        Product     = orderLines.ToList()[i].Product,
                        Order       = orderLines.ToList()[i].Order,
                        OrderId     = orderLines.ToList()[i].Order.Id,
                        Notes       = orderLines.ToList()[i].Note,
                        PackingNote = packingNote,
                        Status      = "Rozpoczęte"
                    };
                    AddPackingNoteLine(pnl);
                }
            }
        }
 public void AddPackingNote(PackingNote packingNote)
 {
     _dbContext.PackingNotes.Add(packingNote);
     _dbContext.SaveChanges();
 }