Using Entity Frame Work [Resolved]

Posted by Saratvaddilli under ASP.NET on 9/13/2012 | Points: 10 | Views : 2445 | Status : [Member] [MVP] | Replies : 0
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


(No response found.)

Login to post response