Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have created some user controls which interact with the database using the entity framework. My question is how to use these controls in SharePoint. Do we have to copy the .edmx file to the /virtualdirectories/site folder?

Any ideas?

Thanks

share|improve this question
add comment

1 Answer 1

The .edmx file is only used within the source. It's compiled with the Entity Model Code Generator Tool which creates the necessary classes. If you build a class library using the Entity Framework all you need to do is reference the output assembly in your SharePoint project. Or you can add an entity data model to your SharePoint project and use it as normal.

share|improve this answer
    
I m Getting this error after adding .edmx file and add the connection string in web.config Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. –  sbtahir Apr 16 '10 at 6:32
    
Its working fine now, just add <trust level="Full" /> inside <system.web> –  sbtahir Apr 16 '10 at 6:44
1  
or add a custom CAS policy to your WSP –  Jaap Vossers Apr 16 '10 at 10:47
    
Or sign the assembly and install to the GAC –  Paul Lucas Apr 16 '10 at 17:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.