public void UpdateProductImage(ProductImagesWM webModel)
 {
     try
     {
         _productImagesOperations.UpdateProductImage(ProductImagesMapping.MapToEntity(webModel));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
 public void DeteleProductImages(List <ProductImagesWM> webModelList)
 {
     try
     {
         _productImagesOperations.DeleteProductImages(ProductImagesMapping.MapToEntity(webModelList));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
        public void AddProductImage(string filePath)
        {
            try
            {
                ProductImagesWM webModel = new ProductImagesWM();

                Bitmap file = new Bitmap(filePath);
                webModel.ProductPicture = ImageConverter(file);

                _productImagesOperations.AddProductImage(ProductImagesMapping.MapToEntity(webModel));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }
        public void AddProductImages(string[] filePaths)
        {
            try
            {
                List <ProductImagesWM> webModelList = new List <ProductImagesWM>();

                foreach (string path in filePaths)
                {
                    Bitmap file = new Bitmap(path);
                    webModelList.Add(new ProductImagesWM()
                    {
                        ProductPicture = ImageConverter(file)
                    });
                }

                _productImagesOperations.AddProductImages(ProductImagesMapping.MapToEntity(webModelList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }