Arshad

Arshad

  • NA
  • 958
  • 47.1k

Problem with Entity Framework inside of Class Library

Aug 27 2010 9:07 AM

Hi All,
I have one class library project with Entity framework. while addind the Entity modal. the framework does generate the connection string in the App.config. After adding this class library in any other Win or web application. i am getting error like its not able to open the connection,after that i copied and pasted the same coonection string from the Class library project to the WinApplication,then it was working fine. so it means connection string is getting reference from the Configuration file of client application. i googled and found that it does work like that. but my requirement is i need to get the connnection string from the class library Application.
Before using the Entity Framework i had the same requirement, that i was able to do. I added the Connection string in side the settings of class library and was able to acess and was working nicely. but in Entity Framework i tried to apply the same logic and changed the modified the auto generated Partial class for EDMX. connection string is fetching from the settings of class library, but its giving error. i dont know that how It does take care. Any suggestion will be helpful for me.
Regards,
Arshad

Answers (2)