Abstracting CRM Providers Using Interfaces
I have created a custom module which can switch to CRM as needed. At present I am using CRM as my Source of Record for custom module. I would like to make sure that custom module, could able to connect to any source of records example sales force, share point portal or any custom application. That thought lead me to apply factory pattern for CRM provider Consider the following sample classes, which allows you to obtain a specific connection object based on the value of a custom enumeration or configuration. Data Provider class namespace DataLayer { public abstract class DataProvider { // singleton reference to the instantiated object static DataProvider _provider; // constructor static DataProvider() { ...