-
Notifications
You must be signed in to change notification settings - Fork 1
IOrganizationService Extensions
Set of extension methods for IOrganizationService base class. Basically these are simple overrides of existing methods which take EntityReference or Entity instead of separate Id
and LogicalName
parameters.
Associate & Disassociate methods override. Take EntityReference (instead of separate Id + LogicalName) input parameter.
public void Associate(EntityReference primaryEntity, Relationship relationship, EntityReferenceCollection relatedEntities);
public void Associate(EntityReference primaryEntity, Relationship relationship, IList<EntityReference> relatedEntities);
public void Associate(EntityReference primaryEntity, String relationshipName, EntityReferenceCollection relatedEntities);
public void Associate(EntityReference primaryEntity, String relationshipName, IList<EntityReference> relatedEntities);
public void Disassociate(EntityReference primaryEntity, Relationship relationship, EntityReferenceCollection relatedEntities);
public void Disassociate(EntityReference primaryEntity, Relationship relationship, IList<EntityReference> relatedEntities);
public void Disassociate(EntityReference primaryEntity, String relationshipName, EntityReferenceCollection relatedEntities);
public void Disassociate(EntityReference primaryEntity, String relationshipName, IList<EntityReference> relatedEntities);
Delete method override. Take EntityReference (instead of separate Id + LogicalName) input parameter. Alternative keys are supported since v 1.0.29
public void Delete(EntityReference reference);
public void Delete(Entity entity);
Delete method override. Deletes using Alternative keys instead of Id. This one use Execute under the hood
public void Delete(string logicalName, KeyAttributeCollection keyAttributeCollection);
public void Delete(string logicalName, string keyName, object keyValue);
Retrieve method override. Take EntityReference (instead of separate Id + LogicalName) input parameter. Alternative keys are supported since v 1.0.29
public Entity Retrieve(EntityReference reference, ColumnSet columnSet);
public Entity Retrieve(EntityReference reference, params String[] columns);
Generic version of Retrieve.
public T Retrieve<T>(EntityReference reference, ColumnSet columnSet) where T : Entity;
public T Retrieve<T>(EntityReference reference, params String[] columns) where T : Entity;
Retrieve method override. Take EntityReference instead of Id. This one use Execute under the hood
public Entity Retrieve(string logicalName, KeyAttributeCollection keyAttributeCollection, ColumnSet columnSet);
public Entity Retrieve(string logicalName, string keyName, object keyValue, ColumnSet columnSet);
public Entity Retrieve(string logicalName, string keyName, object keyValue, params string[] columns);
Generic version of by Alternative key. This one use Execute under the hood
public T Retrieve<T>(string logicalName, string keyName, string keyValue, ColumnSet columnSet) where T : Entity;
public T Retrieve<T>(string logicalName, string keyName, string keyValue, params String[] columns) where T : Entity