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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.