Beispiel #1
0
        protected static void PostImage()
        {
            var data = new ReviewImage
            {
                MimeType = "image/bmp",
                Image    = Convert.ToBase64String(new byte[]
                {
                    0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00,
                    0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x00, 0x00, 0x00, 0xC4, 0x0E, 0x00, 0x00, 0x00, 0x00,
                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF
                })
            };

            var facade = new InfrastructureObjectReviewImagesFacade();

            facade.InsertImage(8, data);
        }
        public void Post(long reviewId, [FromBody] ReviewImage reviewImage)
        {
            var facade = new InfrastructureObjectReviewImagesFacade();

            facade.InsertImage(reviewId, reviewImage);
        }