Linq to Sql in Web
Posted: Thu Oct 27, 2011 5:54 am
Hi,
I was trying to build a report using Linq to Sql. I did a sample using a example posted in Stimulsoft knowledgebase "How to use LinqToSql in your products?". My code as follows, but its not working for me. I tried it in Windows forms and it works.
var report = new StiReport();
var dataContext = new DataContext();
var custQuery =
from cust in dataContext.Customers.AsEnumerable()
where cust.City == "London"
select cust;
report.RegData("Customer", custQuery);
//report.RegBusinessObject("Customer2", custQuery);
webDesigner.Design(report);
Appreciate your help on this.
Thanks,
Hasitha.
I was trying to build a report using Linq to Sql. I did a sample using a example posted in Stimulsoft knowledgebase "How to use LinqToSql in your products?". My code as follows, but its not working for me. I tried it in Windows forms and it works.
var report = new StiReport();
var dataContext = new DataContext();
var custQuery =
from cust in dataContext.Customers.AsEnumerable()
where cust.City == "London"
select cust;
report.RegData("Customer", custQuery);
//report.RegBusinessObject("Customer2", custQuery);
webDesigner.Design(report);
Appreciate your help on this.
Thanks,
Hasitha.