I have an image within the itemtemplate of a RadListView. I'm populating several of the controls within the template on the ItemDataBound event for the ListView with the Entity Framework. I'm new to the Entity Framework so need some help in figuring out how to populate the RadBinaryImage control.
The method I have for retrieving the image is this:
The method I have for retrieving the image is this:
public static byte[] GetAccommodationMainImage(int accomID){ byte[] image = null; using (var myEntity = new MyEntity1()) { var photoRecord = (from accom in myEntity.WTO_Photos where accom.accom_id == accomID && accom.in_use_as_main == true select accom).First(); image = photoRecord.image; } return image;}