3.6. Commercial License Setup

Commercial License Setup

This section covers the initial steps you would need to do in order to use your new commercial license subscription.

  • Kindly refer to the installing section about how to install the latest versions, if you didn’t install them yet.
  • If you were already using v1 of FakeXrmEasy, please check the migration guide first, it’ll help make a smoother transition.
  • Then, see how you can setup our new configurable middleware by checking this section (the migration guide already covers it if you come from v1).
  • Once you have setup your middlware configuration in place, the section below covers how to apply the new commercial license.
  • Once you’re set up, then feel free to have a look at the samples repo and the quickstart section. It’ll cover many other aspects of FakeXrmEasy.

How to use my new commercial license?

There are no license keys, activation codes, or similar at the minute so the setup of the commercial license is very straight-forward.

In order to use the commercial license of FakeXrmEasy v2 or later, developers would just need to specify they’re using the software in a commercial context when building an IXrmFakedContext.

Here’s an example:

public class FakeXrmEasyTestsBase
{
    protected readonly IXrmFakedContext _context;
    protected readonly IOrganizationServiceAsync2 _service;

    public FakeXrmEasyTestsBase() 
    {
        _context = MiddlewareBuilder
                        .New()
                        .AddCrud()
                        
                        .UseCrud()

                        //Here we are saying we're using FakeXrmEasy (FXE) under a commercial context
                        .SetLicense(FakeXrmEasyLicense.Commercial)
                        .Build();

        _service = _context.GetAsyncOrganizationService2();
    }
}