This is a tricky if you can zip then put at skydrive, might help. As my understanding the return type from stored procedule is ObjectResult, It is not compatible with linq so that you'd better convert it to appropriate type.
My thanks to all who tried to help. This one is a little strange, but I have resolved it. It would appear to be an actual bug somewhere down inside Visual Studio or the Entity Framework. Are you ready?
All I had to do was add a real .edmx (to a different database) to the web application, then delete it, and the reference to the other compiled class library (.dll) worked fine. It would seem that just adding a reference to the .dll and adding the necessary
web.config sections is not enough. Something is added to the project when a real .edmx is created and added via the Add New... process.
I cannot take credit for resolving this problem. I found the solution described in a stackoverflow.com thread (you have to scroll down to the bottom)...
thaicarrot
Contributor
5120 Points
1459 Posts
Re: Problems compiling EF5 database first model as class library and using in web project
Jan 26, 2013 05:17 PM|LINK
This is a tricky if you can zip then put at skydrive, might help. As my understanding the return type from stored procedule is ObjectResult, It is not compatible with linq so that you'd better convert it to appropriate type.
Weera
LLahman
Member
38 Points
40 Posts
Re: Problems compiling EF5 database first model as class library and using in web project
Jan 27, 2013 02:09 AM|LINK
My thanks to all who tried to help. This one is a little strange, but I have resolved it. It would appear to be an actual bug somewhere down inside Visual Studio or the Entity Framework. Are you ready?
All I had to do was add a real .edmx (to a different database) to the web application, then delete it, and the reference to the other compiled class library (.dll) worked fine. It would seem that just adding a reference to the .dll and adding the necessary web.config sections is not enough. Something is added to the project when a real .edmx is created and added via the Add New... process.
I cannot take credit for resolving this problem. I found the solution described in a stackoverflow.com thread (you have to scroll down to the bottom)...
http://stackoverflow.com/questions/5021248/could-not-load-file-or-assembly-system-data-entity
That's all the there was to it.
If anyone can pass this on to those involved at Redmond, we would all appreciate it!
Lynn