I have an android client and asp.net server and I'm using web api 2. I want to return an image from the server to the client as part of the response, I mean if my response object is:
public class Product
{
public int Id { get; set; }
public string Name { get; set; }
public string Category { get; set; }
public decimal Price { get; set; }
}
now I want my object to look like:
public class Product
{
public int Id { get; set; }
public string Name { get; set; }
public string Category { get; set; }
public decimal Price { get; set; }
public string Image { get; set; }
}
so that string Image
is an image from a folder in the server solution which contains images.
How can I do this?
(I do not know how to define the image object so I defined it to string)