public static List<Order> GetByInventoryItemId(Guid inventoryItemId)
        {
            List<Order> orderList = new List<Order>();

            using (ObjectConnection objectConnection = new ObjectConnection())
            {
                using (GetOrderByInventoryItemId objectCommand = new GetOrderByInventoryItemId(objectConnection))
                {
                    objectCommand.InventoryItemId = inventoryItemId;

                    objectConnection.Open();
                    using (SqlDataReader sqlDataReader = objectCommand.ExecuteReader())
                    {
                        if (!sqlDataReader.HasRows)
                        {
                            return orderList;
                        }

                        using (OrderSqlDataReader objectSqlDataReader = new OrderSqlDataReader(sqlDataReader))
                        {
                            while (objectSqlDataReader.Read())
                            {
                                Order order = objectSqlDataReader.Order;
                                orderList.Add(order);
                            }
                        }
                    }
                }
            }

            return orderList;
        }
        public static List<Order> GetOrderByLastName(string lastName)
        {
            List<Order> orderList = new List<Order>();

            using (ObjectConnection objectConnection = new ObjectConnection())
            {
                using (GetOrderByLastName objectCommand = new GetOrderByLastName(objectConnection))
                {
                    objectCommand.LastName = lastName;

                    objectConnection.Open();
                    using (SqlDataReader sqlDataReader = objectCommand.ExecuteReader())
                    {
                        if (!sqlDataReader.HasRows)
                        {
                            return orderList;
                        }

                        using (OrderSqlDataReader objectSqlDataReader = new OrderSqlDataReader(sqlDataReader))
                        {
                            while (objectSqlDataReader.Read())
                            {
                                Order order = objectSqlDataReader.Order;
                                orderList.Add(order);
                            }
                        }
                    }
                }
            }

            return orderList;
        }