Table of Contents

Class GraphQlSaveOptions<T>

Namespace
BpNexT.NET.GraphQL.Models
Assembly
BpNexT.NET.GraphQL.dll

Typed save options bound to a model type.

public class GraphQlSaveOptions<T> where T : IDataSetEntity

Type Parameters

T
Inheritance
object
GraphQlSaveOptions<T>

Constructors

GraphQlSaveOptions()

public GraphQlSaveOptions()

Properties

Assign

Typed assign builder.

public AssignOptions<T> Assign { get; }

Property Value

AssignOptions<T>

Condition

Typed conditional builder (reserved for advanced scenarios).

public ConditionOptions<T> Condition { get; }

Property Value

ConditionOptions<T>

Locks

Typed lock builder (reserved for advanced scenarios).

public LockOptions Locks { get; }

Property Value

LockOptions

Methods

If(Expression<Func<T, bool>>, Action<ConditionOptions<T>>)

public GraphQlSaveOptions<T> If(Expression<Func<T, bool>> predicate, Action<ConditionOptions<T>> thenBranch)

Parameters

predicate Expression<Func<T, bool>>
thenBranch Action<ConditionOptions<T>>

Returns

GraphQlSaveOptions<T>

IfNotExists(bool)

public GraphQlSaveOptions<T> IfNotExists(bool enabled = true)

Parameters

enabled bool

Returns

GraphQlSaveOptions<T>

IfNotExists(Expression<Func<T, bool>>)

public GraphQlSaveOptions<T> IfNotExists(Expression<Func<T, bool>> predicate)

Parameters

predicate Expression<Func<T, bool>>

Returns

GraphQlSaveOptions<T>

IfThenElse(Expression<Func<T, bool>>, Action<ConditionOptions<T>>, Action<ConditionOptions<T>>)

public GraphQlSaveOptions<T> IfThenElse(Expression<Func<T, bool>> predicate, Action<ConditionOptions<T>> thenBranch, Action<ConditionOptions<T>> elseBranch)

Parameters

predicate Expression<Func<T, bool>>
thenBranch Action<ConditionOptions<T>>
elseBranch Action<ConditionOptions<T>>

Returns

GraphQlSaveOptions<T>

ModifyLsn(long)

public GraphQlSaveOptions<T> ModifyLsn(long modifyLsn)

Parameters

modifyLsn long

Returns

GraphQlSaveOptions<T>

Raise(string)

public GraphQlSaveOptions<T> Raise(string message)

Parameters

message string

Returns

GraphQlSaveOptions<T>

SuppressRelatedUpdates<TValue>(Expression<Func<T, TValue>>)

Emits suppressRelatedUpdates: true on the given field's set:, stopping the server from cascading changes to dependent fields (e.g. setting a payment condition would otherwise also set the related Skonto fields). Only valid for fields whose schema exposes the parameter; call once per field.

public GraphQlSaveOptions<T> SuppressRelatedUpdates<TValue>(Expression<Func<T, TValue>> field)

Parameters

field Expression<Func<T, TValue>>

Returns

GraphQlSaveOptions<T>

Type Parameters

TValue

UseContext()

public GraphQlSaveOptions<T> UseContext()

Returns

GraphQlSaveOptions<T>

UseCurrent()

public GraphQlSaveOptions<T> UseCurrent()

Returns

GraphQlSaveOptions<T>