Kopīgot, izmantojot


IOrganizationService Interface

Definition

Provides programmatic access to the metadata and business data in an organization (environment).

public interface class IOrganizationService
[System.ServiceModel.ServiceContract(Name="IOrganizationService", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Services")]
public interface IOrganizationService
[<System.ServiceModel.ServiceContract(Name="IOrganizationService", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Services")>]
type IOrganizationService = interface
Public Interface IOrganizationService
Derived
Attributes

Remarks

The IOrganizationService interface provides all the methods you will use to interact with data in Dataverse using the SDK for .NET.

Client applications should use the Microsoft.PowerPlatform.Dataverse.Client NuGet package to get access to the PowerPlatform.Dataverse.Client.ServiceClient which implements the IOrganizationService interface. Learn how to transition apps to Dataverse ServiceClient.

Plug-in developers get access to a IOrganizationService instance by using the IOrganizationServiceFactory.CreateOrganizationService method so that they can perform data operations within plug-ins.

IOrganizationServiceFactory serviceFactory =
    (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService orgService = serviceFactory.CreateOrganizationService(context.UserId);

Learn about services you can use in plug-in code.

Methods

Associate(String, Guid, Relationship, EntityReferenceCollection)

Creates a link between records.

Create(Entity)

Creates a record.

Delete(String, Guid)

Deletes a record.

Disassociate(String, Guid, Relationship, EntityReferenceCollection)

Deletes a link between records.

Execute(OrganizationRequest)

Executes a message in the form of a request, and returns a response.

Retrieve(String, Guid, ColumnSet)

Retrieves a record.

RetrieveMultiple(QueryBase)

Retrieves a collection of records.

Update(Entity)

Updates an existing record.

Applies to