Table of Contents

Class PersonResourceAction

Namespace
adas_core.Domain.Models
Assembly
adas-core.Domain.dll

Represents an action that can be performed on a person resource.

public class PersonResourceAction
Inheritance
PersonResourceAction
Inherited Members
Extension Methods

Remarks

Typically used to model operations, commands, or permissions associated with a person entity within a resource-based system.

Properties

Action

public ActionsEnum.ResourceAction? Action { get; set; }

Property Value

ActionsEnum.ResourceAction?

Resource

public PersonResource? Resource { get; set; }

Property Value

PersonResource

Methods

Apply(List<PersonResourceAction>)

Applies the specified list of PersonResourceAction items and returns the resulting PersonResource collection. This overload delegates to another Apply implementation, passing null as the initial state.

public static List<PersonResource>? Apply(List<PersonResourceAction> actions)

Parameters

actions List<PersonResourceAction>

The list of actions to be applied.

Returns

List<PersonResource>

A List<T> containing the result of applying the actions.

Apply(List<PersonResource>?, List<PersonResourceAction>?)

Applies a list of add, update, and delete actions to a source list of person resources, returning the resulting list. Resources are added only if not already present, removed when marked for deletion, and replaced in place when updated (or added if not found).

public static List<PersonResource>? Apply(List<PersonResource>? source, List<PersonResourceAction>? actions)

Parameters

source List<PersonResource>

The source list of person resources to mutate. If null, an empty list is used.

actions List<PersonResourceAction>

The list of resource actions (add, delete, update) to apply to the source. If null, no actions are applied.

Returns

List<PersonResource>

The resulting list of person resources after applying the actions, or null if the resulting list is empty.