There is a web application which is built in asp.net webforms with entity framework. Database sqlserver 2008 R2. I need to build a new sharepoint portal which will be using the exisiting database i.e., using its table , views , storedprocedure, user defined table type etc. Can we include entity framework in sharepoint ?

One way i am able to use the external database by using external content type. but it seems it is not serving the purpose. Any suggestion is appreciable !

1 Answer 1


I usually separate between custom databases and SharePoint data.

If I have a custom database I don't try to display that in built-in SharePoint views such as list-views etc. I build custom UI - webparts, application pages etc which displays custom database data in ASP.NET or javascript controls. I may also build custom code to display combined data from both SharePoint and a custom database - I get the custom database data e.g. via Entity Framework and the SharePoint data via REST API/CAML queries or some other way and then combine the data in custom code.

Operations in SharePoint data may trigger changes in custom database database - e.g. via Event listeners. User actions in the custom UI may invoke updates in both SharePoint data and custom database data.

Alot of coding ahead with this approach, but I haven't seen any good quick solution except for simple scenarios where External Content Type suffices.

  • Thanks for response. So can we use entity framework with custom code like visual webpart in sharepoint solution via REST API ? can you provide any link if possible ?
    – DebugCode
    Commented Aug 10, 2016 at 11:44
  • I am looking for this possibility as because the from that SP portal i have to fetch and update the data of the external database.
    – DebugCode
    Commented Aug 10, 2016 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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