Click or drag to resize
IContactRelationAssignerAssign Method (IUserInfo, ContactInfo, IContactDataPropagationChecker)
Creates relationship between given user and contact.

Namespace: CMS.ContactManagement
Assembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 12.0.0
Syntax
C#
void Assign(
	IUserInfo user,
	ContactInfo contact,
	IContactDataPropagationChecker checker = null
)

Parameters

user
Type: CMS.BaseIUserInfo
User to be assigned to the contact
contact
Type: CMS.ContactManagementContactInfo
Contact the user should be assigned to
checker (Optional)
Type: CMS.ContactManagementIContactDataPropagationChecker
Checks whether the object should be assigned.
Remarks
Creates new ContactMembershipInfo record with given user and contact.
Examples
Following example shows how to use method Assign(IUserInfo, ContactInfo, IContactDataPropagationChecker).
...
IContactRelationAssigner contactRelationAssigner = someImplementation;
var user = someUser;
var contact = someContact;

// Will create new ContactMembershipInfo record of type User linking to the given contact and user
contactRelationAssigner.Assign(user, contact);
...
See Also