Skip to content

Getting a ServiceClient from XrmFakedContext #29

Discussion options

You must be logged in to vote

Hi @sandeep-chinni ,

There's no need to use Moq since ServiceClient already implements IOrganizationService/2. You need to refactor your azure function code to either use IOrganizationService or IOrganizationService2, then pass your ServiceClient instance into those methods. Doing it that way there is no need to cast anything as ServiceClient already implements those interfaces.

WIth FakeXrmEasy you could use IOrganizationService, IOrganizationServiceAsync, or IOrganizationServiceAsync2 interfaces.

Suggest starting with specific documentation about version 3:

A specific section for AzureFunctions: https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/azure-functions/. In there you…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@jordimontana82
Comment options

@sandeep-chinni
Comment options

@jordimontana82
Comment options

@jordimontana82
Comment options

@KannanPooja
Comment options

Answer selected by jordimontana82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants