
Microsoft Dynamics 365 Extensions Cookbook

Given that we have refactored our plugin in the previous recipe, we will now demonstrate how easy it is to swap a concrete DAL class with an alternative implementation.
In this recipe, we will replace the LINQ EmailDataAccessLayer
implementation with a QueryExpression
implementation. We will also drop the unit of the work design pattern and use IOrganizationService
instead of OrganisationServiceContext
.
To implement this recipe, we will need the existing code structure from the previous recipe. If you are starting from scratch, you can follow the code structure from the previous recipe and replace the implementation with your own code.
As with any recipe that deals with C# code, it is strongly recommended that you use a stable version of Visual Studio. In our example, we will be using Visual Studio 2015.
EmailDataAccessLayerQueryExpression
in the DataAccessLayer
folder that...