Show / Hide Table of Contents

Class SoRole

Inheritance
object
NestedPersist
NestedPersistFacade
SoRole
Implements
INestedPersist
Inherited Members
NestedPersistFacade.IsDirty
NestedPersist.SetSaveOwner(INestedPersist)
NestedPersist.SaveAsync()
NestedPersist.IsSaving
NestedPersist.OnElementSaved
NestedPersist.OnElementIdUpdate
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.CRM.Administration
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public sealed class SoRole : NestedPersistFacade, INestedPersist

Constructors

SoRole(bool)

Declaration
public SoRole(bool initialize = true)
Parameters
Type Name Description
bool initialize

Properties

DataRightRows

Declaration
public DataRightRows DataRightRows { get; }
Property Value
Type Description
DataRightRows

IsDeleted

Gets a value indicating whether this instance is deleted.

Declaration
public override bool IsDeleted { get; }
Property Value
Type Description
bool

true if this instance is deleted; otherwise, false.

Overrides
NestedPersist.IsDeleted

IsMarkedForDelete

Gets or sets a value indicating whether this instance is marked for delete.

Declaration
public override bool IsMarkedForDelete { get; set; }
Property Value
Type Description
bool

true if this instance is marked for delete; otherwise, false.

Overrides
NestedPersist.IsMarkedForDelete

Row

Declaration
public RoleRow Row { get; }
Property Value
Type Description
RoleRow

Methods

DeleteAsync()

Declaration
public Task DeleteAsync()
Returns
Type Description
Task

GetFacadingItems()

Implement this method to expose items that needs to be persisted.

Declaration
protected override IEnumerable<INestedPersist> GetFacadingItems()
Returns
Type Description
IEnumerable<INestedPersist>

Collection of items that needs to be persisted.

Overrides
NestedPersistFacade.GetFacadingItems()

GetRoleAsync(int, CancellationToken)

Declaration
public static Task<SoRole> GetRoleAsync(int roleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int roleId
CancellationToken cancellationToken
Returns
Type Description
Task<SoRole>

OnIdUpdateAsync()

Update related objects with correct id's to make sure that relations are consistent before saving to the database.

Declaration
protected override Task OnIdUpdateAsync()
Returns
Type Description
Task
Overrides
NestedPersistFacade.OnIdUpdateAsync()

OnPreIdUpdateAsync()

Allow for "fake id's" to be forced upon related objects.

Declaration
protected override Task OnPreIdUpdateAsync()
Returns
Type Description
Task
Overrides
NestedPersistFacade.OnPreIdUpdateAsync()
Remarks

In order to figure out which objects taking part of the nested save operation that actually needs to be saved, this method allows for "fake id's" to be forced upon related objects. Upon receiving the "fake id", the objects receiving such an id can determine if they needs to be persisted (e.g. saved) to the database. However, the fake id's forced upon related objects must be set to correct id's in the OnIdUpdate method taking place later in the save operation.

Implements

INestedPersist

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top