data URI

Returning Byte Array Data in ASP.NET MVC

Assume you have the following ASP.NET MVC model which contains a byte array property which will be used to hold data for an image. public class CompanyModel { public string Id { get; set; } public string Name { get; set; } public byte[] Logo { get; set; } } On the controller side, you fetch the data from the database using code similar to the following public ActionResult Settings(string countyId) { var county = _session.