Skip to content

Sample repo for Power Platform Developer Saturday (365portal.org)

License

Notifications You must be signed in to change notification settings

DynamicsValue/power-platform-dev-saturday

Repository files navigation

Power Platform Developer Saturday with FakeXrmEasy


This is the sample repo for Power Platform Developer Saturday session about What's new in FakeXrmEasy.

NOTE: You won't be able to build this project (yet) since v2 is not yet public, but can you use it get an idea of what's coming along with the slides at the root of this repo and the video of today's session at the Power Platform Developer event.

This sample project demonstrates how to use Microsoft's new CdsServiceClient nuget package along with FakeXrmEasy to unit test the backend of an aspnet core application that talks to CDS (Common Data Service).

It's based on Colin's CdsWeb sample. This sample just adds a unit test project and a react frontend to showcase some basic unit tests of CRUD operations as demo of what's coming in FakeXrmEasy v2.

The new nuget package along with FakeXrmEasy on .net core opens up endless possibilities of testing a bunch of different client applications:

  • .net core console apps
  • aspnet core
  • azure functions (.net core)
  • etc

Plus the ability that those applications could be easily containerised and run in a Kubernetes cluster.

Layout

Prerequisites

In order to run this application you'll need a Common Data Service intance, and register both an App on Azure and an Application User that can be used to authenticate using an AuthType=ClientSecret connection string.

@BetimBeja has written an excellent article which explains how to setup the ApplicationUser on this LinkedIn post

Add a new appsettings.Development.json config file with the ConnectionString once you have setup the ApplicationUser and you should be good to go.

"CdsServiceClient": {
  "ConnectionString": "<YourConnectionStringHere>",
  "IncludeOrganizationServiceContext": true,
  "TraceLevel": "Off"
}

Building

dotnet build

Running Tests

dotnet test

Running the application

dotnet run --project src/web

Application will be running on https://localhost:5001

About

Sample repo for Power Platform Developer Saturday (365portal.org)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published