DevForce Help Reference
Contains(IEntityScalarQuery,Object) Method
Example 


Determines whether a sequence contains any elements that match the specified element.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function Contains( _
   ByVal source As IEntityScalarQuery, _
   ByVal item As Object _
) As Task(Of Boolean)
'Usage
 
Dim source As IEntityScalarQuery
Dim item As Object
Dim value As Task(Of Boolean)
 
value = EntityScalarAsyncExtensions.Contains(source, item)
[Extension()]
public static Task<bool> Contains( 
   IEntityScalarQuery source,
   object item
)

Parameters

source
item
Example
public async void AsyncAny() {
  bool anyEmps = await _entityManager.Employees.AsScalarAsync().Any();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityScalarAsyncExtensions Class
EntityScalarAsyncExtensions Members
Overload List

Send Feedback