You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/common-data-service/org-service/early-bound-programming.md
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,26 @@ Which style you choose to use is up to you. The following table provides the adv
136
136
137
137
Because all the generated classes inherit from the <xref:Microsoft.Xrm.Sdk.Entity> class used with late-bound programming, you can work with entities, attributes, and relationships not defined within classes.
138
138
139
-
### Example
139
+
### Examples
140
+
141
+
The following example shows one way to mix early and late binding methods using <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceContext>.
Copy file name to clipboardExpand all lines: powerapps-docs/developer/common-data-service/org-service/organizationservicecontext.md
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,17 @@ if (pam != null)
85
85
TaskfirstTask=pam.Contact_Tasks.FirstOrDefault();
86
86
}
87
87
```
88
+
### Use the AddLink method
89
+
You can use the <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.AddLink(Microsoft.Xrm.Sdk.Entity,Microsoft.Xrm.Sdk.Relationship,Microsoft.Xrm.Sdk.Entity)> method to create associations. You must call the <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.SaveChanges> method before the server is updated with the new link information.
88
90
91
+
The following code example shows how to create an association between a contact and an account.
0 commit comments