I'm using ASP.NET Web API and I'm trying to figure out the best way to post an instance of PictureData object.
public class PictureData
{
public Stream Data { get; set; }
public PictureType Type { get; set; }
public string EntityId { get; set; }
}
Is there a way to convert the object to stream and post as stream, or I should keep all properties strings and ints and post it as JSON? What's the best approach?