Using Entity Frame Work [Resolved]

Posted by Saratvaddilli under ASP.NET on 9/13/2012 | Points: 10 | Views : 2165 | Status : [Member] [MVP] | Replies : 1
hi to every one,
BuybooksDataBaseEntities db = new BuybooksDataBaseEntities();
DataTable table = new DataTable();
table = db.DisplayImages; // its showing that cannot implicitly convert object set to datatable
so i tried this
object obj=db.displayimages;
in my Dal:
public object LoadImages()
{ BuybooksDataBaseEntities db = new BuybooksDataBaseEntities();
var tabletest = db.DisplayImages;

return tabletest;


in my BAL
public object LoadImages()
BuyBooksDAL.BuyBooksDal dal = new BuyBooksDAL.BuyBooksDal();
return dal.LoadImages();

in Aspx.cs
protected void Page_Load(object sender, EventArgs e)
private void GetImage()
BuyBooksBAL.BuyBooksBal bal = new BuyBooksBAL.BuyBooksBal();
object obj = bal.LoadImages();
lv1.DataSource = obj;
< Here before binding i want filter the table; i had a column category so i want to filter like this category="Stephen Hawking " >

Please Help Me .......

Thanks and Regards
Show difficulties that how difficult you are


Posted by: Chikkanti on: 9/17/2012 [Member] Starter | Points: 50


Hi To learn about Entity Framework using conditions and edit update and delete operations refer following links..


Saratvaddilli, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response