Click or drag to resize
ObjectQueryBaseTQuery, TObjectFirstObject Property

Note: This API is now obsolete.

Returns first object from the query result DataSet. The property does not limit the actual number of fetched rows.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 12.0.0
Syntax
C#
[ObsoleteAttribute("Use System.Linq.Enumerable.FirstOrDefault<TSource>(this System.Collections.Generic.IEnumerable<TSource>) extension method instead.")]
public TObject FirstObject { get; }

Property Value

Type: TObject

Implements

IObjectQueryTQuery, TObjectFirstObject
Remarks

Accessing this property effectively results in performing the query (i.e. fetching all rows the query selects, if not already fetched) and returning the first object from the query result DataSet.

To limit the number of fetched rows use TopN(Int32).

See Also