Creating a WCF data service based on Entity Framework is fairly easy in Visual Studio 2010 (see here for step by step), but two Major steps are:
Now let's host this WCF data service in SharePoint _vti_bin folder, just like listdata.svc:
- Add Entity Framework Model:
- Add WCF data service
- In web.config, the following connection string is added:
- if you right click on .svc file in Visual Studio and View Markup, you will see something like the followings. The point is, it is not strongly named!
Now let's host this WCF data service in SharePoint _vti_bin folder, just like listdata.svc:
- Sign this project:
- Strong Name AWDataService.svc Markup:
- Add an empty SharePoint project and add a sharepont mapping folder- ISAPI with following items:
- an existing item: AWDataService.svc
- a new item: web.config with the above connection string included
- Add service dll into sharepoint package to be deployed into GAC:
- Optimize by not including sharepoint project assembly in the package since it will be an empty dll otherwise