O'Reilly logo

Microsoft Dynamics 365 Extensions Cookbook by Rami Mounla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required