The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

FetchOnlyAttribute Class

Applied to persistent properties and fields. When applied, specifies that the target property or field value can be loaded from the database but should not be saved (should not be included in the INSERT and UPDATE SQL statements).

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public sealed class FetchOnlyAttribute : Attribute
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, Inherited:=True)>
Public NotInheritable Class FetchOnlyAttribute
    Inherits Attribute
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true)]
public sealed class FetchOnlyAttribute : Attribute
<AttributeUsage(AttributeTargets.Field Or AttributeTargets.Property, Inherited:=True)>
Public NotInheritable Class FetchOnlyAttribute
    Inherits Attribute

Remarks

This attribute is helpful when you need to map XPO class properties/fields to:

You can decorate a property/field with the FetchOnlyAttribute directly in code or using the Data Model Designer. The designer applies this attribute when you enable the Fetch Only option. In the metadata (see XPTypeInfo), the XPMemberInfo.IsFetchOnly property returns True for members with this attribute.

Note

In a NestedUnitOfWork, the attribute's target property/field value is not passed to the parent session.

Inheritance

Object
Attribute
FetchOnlyAttribute

Implements

See Also