Class GraphQlSaveOptions<T>
Typed save options bound to a model type.
public class GraphQlSaveOptions<T> where T : IDataSetEntity
Type Parameters
T
- Inheritance
-
objectGraphQlSaveOptions<T>
Constructors
GraphQlSaveOptions()
public GraphQlSaveOptions()
Properties
Assign
Typed assign builder.
public AssignOptions<T> Assign { get; }
Property Value
Condition
Typed conditional builder (reserved for advanced scenarios).
public ConditionOptions<T> Condition { get; }
Property Value
Locks
Typed lock builder (reserved for advanced scenarios).
public LockOptions Locks { get; }
Property Value
Methods
If(Expression<Func<T, bool>>, Action<ConditionOptions<T>>)
public GraphQlSaveOptions<T> If(Expression<Func<T, bool>> predicate, Action<ConditionOptions<T>> thenBranch)
Parameters
predicateExpression<Func<T, bool>>thenBranchAction<ConditionOptions<T>>
Returns
IfNotExists(bool)
public GraphQlSaveOptions<T> IfNotExists(bool enabled = true)
Parameters
enabledbool
Returns
IfNotExists(Expression<Func<T, bool>>)
public GraphQlSaveOptions<T> IfNotExists(Expression<Func<T, bool>> predicate)
Parameters
predicateExpression<Func<T, bool>>
Returns
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
predicateExpression<Func<T, bool>>thenBranchAction<ConditionOptions<T>>elseBranchAction<ConditionOptions<T>>
Returns
ModifyLsn(long)
public GraphQlSaveOptions<T> ModifyLsn(long modifyLsn)
Parameters
modifyLsnlong
Returns
Raise(string)
public GraphQlSaveOptions<T> Raise(string message)
Parameters
messagestring
Returns
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
fieldExpression<Func<T, TValue>>
Returns
Type Parameters
TValue
UseContext()
public GraphQlSaveOptions<T> UseContext()
Returns
UseCurrent()
public GraphQlSaveOptions<T> UseCurrent()