Executes the query and returns the first element of the sequence, or the appropriate NullEntity if no element is found.
Syntax
Example
C# | Copy Code |
---|
var mgr = new DomainModelEntityManager();
var query = new EntityKeyQuery(new EntityKey(typeof(Customer), 1));
Customer cust = query.With(mgr).FirstOrNullEntity() as Customer; |
Remarks
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also