How to do it...

  1. Create a public interface called IBaseDataAccessLayer in a folder called DataAccessLayer.
  2. Add the following using statement:
   using Microsoft.Xrm.Sdk; 
  1. Add the following two signatures:
   void UpdateEntity(Entity entity);    void Commit(); 
  1. Create a public base class called BaseDataAccessLayer that implements IBaseDataAccessLayer and IDisposable in the same folder.
  2. Include the following using statements:
using Microsoft.Xrm.Sdk; using Packt.Xrm.Entities; 
  1. Remove the organization server and organization proxy from your old plugin and then add a protected variable to your abstract class, as follows:
protected IOrganizationService OrganizationService; protected OrganisationServiceContext OrganizationContext; 
  1. Create the ...

Get Microsoft Dynamics 365 Extensions Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.