Prem Anandh J

Prem Anandh J

  • NA
  • 492
  • 30.6k

Show images in WPF datagrid from Database using EF

Sep 11 2015 2:09 AM
Hi friends,
   I have some client details in dataBase(Blob Fields). Also am using EntityFramwork4 in my WPF C# Window application.
Here need to show the client details in DataGrid along their photos.
I did this in C#WinForm but the images not showing in WPF DataGrid.
My code is,
 
CustomerDBEntity ctx = new CustomerDBEntity (); //ConnectionString of EntityFramework
var load = from g in ctx.clients select new {g.userID, g.clientName,   g.DOB,g.mobile, g.mailID,g.address,g.photo};  // Clients is aTable
if (load.Count()>0)
{
dataGrid1.ItemsSource = load.ToList();
} 
 
 Please post some suggestion.
 

Answers (1)