You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
839 B
C#

using Org.BouncyCastle.Crypto.Paddings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC
{
public class TestimonialImagesDTO
{
public int TestimonialImageID { get; set; }
public int TestimonialID { get; set; }
public string ImageType { get; set; }
public byte[] ImageData { get; set; }
public string ImageDataForWeb => GetImageDataForWeb();
private string GetImageDataForWeb()
{
string imageData = ImageData == null ? string.Empty : Convert.ToBase64String(ImageData);
return $"data:{ImageType ?? string.Empty};base64,{imageData}";
}
}
public class TestimonialImagesDTOCollection : List<TestimonialImagesDTO> { }
}