web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse SDK and depe...
Power Apps
Unanswered

Dataverse SDK and dependency injection

(0) ShareShare
ReportReport
Posted on by 32

Looking at the dataverse service client, but I'm wondering what is the best approach to have the client injected.
I see the client is implementing several interfaces: IOrganizationService, IOrganizationServiceAsync and IOrganizationServiceAsync2

 

I assume we inject one of the interfaces and not the client itself, so that it can make unit testing easier?

 

From the https://github.com/microsoft/PowerPlatform-DataverseServiceClient/discussions, it is not clear what is the best way of doing this.

 

Not sure whether I have to post here, or on the GitHub issues of the project

 

@MattB-MSFT @JimDaly-MSFT 

 

I have the same question (0)
  • kalluu91 Profile Picture
    39 on at

    You can inject the IOrganizationServiceAsync2 which includes all the methods of IOrganizationService and IOrganizationServiceAsync.

     

    Cheers,

    Kim Anh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard