public List <CarPictureModel> GetAllCarImagesAndNumberOfCars()
        {
            DataTable dt = new DataTable();
            List <CarPictureModel> arrCarPictures = new List <CarPictureModel>();

            using (MySqlCommand command = new MySqlCommand())
            {
                dt = GetMultipleQuery(CarStringsMySql.GetAllCarImagesAndNumberOfCars());
            }

            foreach (DataRow ms in dt.Rows)
            {
                CarPictureModel carPictureModel = CarPictureModel.ToObject(ms);

                arrCarPictures.Add(carPictureModel);
            }

            return(arrCarPictures);
        }
        public CarPictureModel GetNumberOfCarWithImage(string pictureName)
        {
            if (pictureName.Equals(""))
            {
                throw new ArgumentOutOfRangeException();
            }
            DataTable       dt = new DataTable();
            CarPictureModel carPictureModelSql = new CarPictureModel();

            using (MySqlCommand command = new MySqlCommand())
            {
                dt = GetMultipleQuery(CarStringsMySql.GetNumberOfCarWithImage(pictureName));
            }
            foreach (DataRow ms in dt.Rows)
            {
                carPictureModelSql = CarPictureModel.ToObject(ms);
            }

            return(carPictureModelSql);
        }