Click or drag to resize
ContactInfoObjectQueryExtensionsWithEmail Method
Filters out contacts whose email address does not match given email.

Namespace: CMS.ContactManagement
Assembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 12.0.0
Syntax
C#
public static ObjectQuery<ContactInfo> WithEmail(
	this ObjectQuery<ContactInfo> contactsQuery,
	string email
)

Parameters

contactsQuery
Type: CMS.DataEngineObjectQueryContactInfo
Query which will be changed to omit contacts not satisfying the condition
email
Type: SystemString
Email address the contacts will be filtered for. Can be null, in such case filters contacts with email address set to null

Return Value

Type: ObjectQueryContactInfo
Modified query

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ObjectQueryContactInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptioncontactsQuery is null
Remarks
Since email address is not unique per contact on single site, query can contain multiple contacts.
See Also