public static ProductImages MapToEntity(ProductImagesWM webModel)
 {
     return(new ProductImages()
     {
         ProductImageID = webModel.ProductImageID,
         ProductPicture = webModel.ProductPicture
     });
 }
 public void UpdateProductImage(ProductImagesWM webModel)
 {
     try
     {
         _productImagesOperations.UpdateProductImage(ProductImagesMapping.MapToEntity(webModel));
     }
     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());
            }
        }