Show / Hide Table of Contents

    SetValueAttribute.SetValueAttribute(string source, string target, SetValueStrategy setValueStrategy, ModelSelector modelSelector) Constructor

    .NET Standard 2.x

    Initializes a new instance of the SetValueAttribute class.

    Namespace: SnapObjects.Data

    Assembly: SnapObjects.Data.dll

    Syntax

    public SetValueAttribute(string source, string target, SetValueStrategy setValueStrategy, ModelSelector modelSelector) 
    

    Parameters

    source System.String

    A property of the model class at the same level.

    Use this format to make reference: $PropertyName, for example, $Id.

    target System.String

    A property of the model class at one level lower.

    Use this format to make reference: $PropertyName, for example, $Id.

    setValueStrategy SnapObjects.Data.SetValueStrategy

    The timing when the value will be set. Whether it is after the insert operation or the update operation in the model class at the same level.

    The default is SetValueStrategy.Always which indicates values should always be set for the specified property in the embedded model whenever there is an insert or update operation in the model at the same level.

    modelSelector SnapObjects.Data.ModelSelector

    Determines whether to set the value by the data state in the embedded model.

    The default is ModelSelector.All which indicates values should be set no matter whether the data has been updated or not in the embedded model.

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon