
The question I have is around the best practices for accessing external databases through CRM plugins. We currently have a separate set of common libraries that utilize Entity framework to write to their specific databases. When we tried to utilize this library within a plugin by using ILMerge of the dependent assembies the plugin threw an error around the entity framework SQL Provider.
"No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file"
We are on premise so we could, but don't want to probably adjust the CRM config file to handle this, however this brought up a design discussion on how this should be built. So we are looking for ideas or options around how to access external databases that CRM and other application my share.
*This post is locked for comments
I have the same question (0)I will recommend to create web service for external database operations and call this web service into CRM plugin.
Here are some examples of how to call web service in CRM plugin
code.msdn.microsoft.com/How-to-call-External-WCF-42c4490d
mscrmmindfire.wordpress.com/.../calling-external-web-service-from-a-crm-2011-plug-in
main thing you need to consider is that it might slow down your plugin execution because of external web service.. so instead of using Synchronous plugin you can try using Asynchronous plugin or workflow to do operations on external database if external database is not required to update immediately.
Hope this will help..