Mar6

Enabling Entity Framework (ADO.NET Entity Data Model) in a SharePoint 2007 web.config file

Categories: SharePoint 2007
The Entity Framework is considered to be the modern day successor to "LINQ to SQL". If you wish to use this technology in a SharePoint 2007 web part you will need to tweak your web.config file to accomodate the new assemblies that are associated with the Entity Framework. Here are the changes that you need to apply to your web.config file:
 
1) Add the following tags to the <compilation><assemblies> section:
 
<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
 
2) Add the following tags to the <compilation> section just under the closing </assemblies> tag:
 
<buildProviders>
        <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
</buildProviders>
 
 

Links to this post

Comments

Leave a comment





CAPTCHA Image Validation