This is a migrated thread and some comments may be shown as answers.

entitydatasource object context is empty

2 Answers 104 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marlou
Top achievements
Rank 1
Marlou asked on 01 May 2012, 11:33 AM
Hi!

I have a class library with my reports in it. I have another project where my entitymodel is in. In my reports project I've added a reference to the project where my entitymodel is in. I've also added the connection string to the reports project and rebuild the project. In my project I try to use an entitydatasource. I can select the connectionstring from the web.config, but if I click next, the Object Context is empty and I can't select anything.

Why is this happening and how can I fix it?

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 03 May 2012, 05:27 PM
Hi Marlou,

Check the help topic about retrieving data from an entity data model with the EntityDataSource component in our documentation, which discusses more in-depth how to extend your ObjectContext with a method to execute a custom business logic against the entity model and how to invoke that method using the EntityDataSource component.

Regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Luki
Top achievements
Rank 1
answered on 29 Nov 2012, 04:10 PM
Hi, I have exactly the same problem as Marlou.
I've tried a few hours to find a solution for the problem - but wasn't successful.

@Steve, is your advice then, to do it in code behind instead of the Designer?

PS: I am using Q3 2012 and VS2012 .net 4.5

EDIT: Finally I found the problem:

EF 5.0 is generating a DBContext instead of an ObjectContext per default, which was new to me.
Tags
General Discussions
Asked by
Marlou
Top achievements
Rank 1
Answers by
Steve
Telerik team
Luki
Top achievements
Rank 1
Share this question
or