Show / Hide Table of Contents

Class Organisation

Represents an organisation in the identity system.

Inheritance
Object
ListOrganisation
Organisation
Inherited Members
ListOrganisation.Id
ListOrganisation.Name
ListOrganisation.IdentityNumber
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
public class Organisation : ListOrganisation, IOrganisation, IEventAggregate, IHaveClaims, IMultitenantEntity, IEventSourced
Remarks

The top level organisation can be a tenant, but child organisations are not.

Constructors

Organisation()

Creates a new instance of Organisation.

Declaration
public Organisation()

Properties

Claims

Navigation property for the claims this organisation possesses.

Declaration
public virtual ICollection<OrganisationClaim> Claims { get; }
Property Value
System.Collections.Generic.ICollection<OrganisationClaim>

Created

Gets or sets the date and time, in UTC, when the organisation was created.

Declaration
public DateTimeOffset Created { get; set; }
Property Value
System.DateTimeOffset

Implements
IOrganisation.Created

GroupMotherId

Gets or sets the Id of the group mother (root organisation) in the organisation tree.

Declaration
public Guid GroupMotherId { get; set; }
Property Value
System.Guid

Implements
IOrganisation.GroupMotherId
Remarks

For the group mother, this value will be the same as Id.

Parent

Declaration
public Organisation Parent { get; set; }
Property Value
Organisation

ParentId

Gets the identity of this tenants parent, if any.

Declaration
public Guid? ParentId { get; set; }
Property Value
System.Nullable<System.Guid>

Implements
IOrganisation.ParentId

Subsidiaries

Gets a collection of subsidiaries organisations. WARNING: An organisaiton can have subsidiaries, even if the collection is empty, because a complete tree is never loadded from the database.

Declaration
[ForeignKey("ParentId")]
public List<Organisation> Subsidiaries { get; }
Property Value
List<Organisation>

TrustedDomains

Gets a collection of trusted domain that the organisation owns and therefor want to allow users with e-mail addresses from that domain to sign-up.

Declaration
[ForeignKey("OrganisationId")]
public List<TrustedDomain> TrustedDomains { get; }
Property Value
List<TrustedDomain>

Methods

AddClaim(String, String)

Adds a claim to the organisation.

Declaration
public void AddClaim(string claimType, string claimValue)
Parameters
String claimType

The type of claim.

String claimValue

The value of the claim.

Implements
IOrganisation.AddClaim(String, String)

AddTrustedDomain(String)

Adds domainName as a trusted domain for this organisation.

Declaration
public void AddTrustedDomain(string domainName)
Parameters
String domainName

The domain name to add.

Implements
IOrganisation.AddTrustedDomain(String)

GetClaims()

Gets a collection of claims for this person.

Declaration
public virtual IEnumerable<Claim> GetClaims()
Returns
IEnumerable<System.Security.Claims.Claim>

A collection of claims.

Implements
IHaveClaims.GetClaims()

RaiseEvent(IEvent)

Adds an event to the aggregate. The added event will be handled if an IEventSourceRepository is configured.

Declaration
public virtual void RaiseEvent(IEvent event)
Parameters
IEvent event

The IEvent to add to the aggregate.

Implements
IEventAggregate.RaiseEvent(IEvent)

RemoveClaim(Int32)

Removes the claim with id.

Declaration
public void RemoveClaim(int id)
Parameters
System.Int32 id

The id of the claim to remove.

Implements
IOrganisation.RemoveClaim(Int32)

RemoveTrustedDomain(String)

Removes domainName as a trusted domain for this organisation.

Declaration
public void RemoveTrustedDomain(string domainName)
Parameters
String domainName

The domain name to delete.

Implements
IOrganisation.RemoveTrustedDomain(String)

Explicit Interface Implementations

IMultitenantEntity.TenantId

Declaration
Guid IMultitenantEntity.TenantId { get; set; }
Returns
System.Guid

Implements
IMultitenantEntity.TenantId

IOrganisation.Claims

Declaration
IEnumerable<OrganisationClaim> IOrganisation.Claims { get; }
Returns
IEnumerable<OrganisationClaim>

Implements
IOrganisation.Claims

IOrganisation.Parent

Declaration
IOrganisation IOrganisation.Parent { get; }
Returns
IOrganisation

Implements
IOrganisation.Parent

IOrganisation.Subsidiaries

Declaration
IEnumerable<IOrganisation> IOrganisation.Subsidiaries { get; }
Returns
IEnumerable<IOrganisation>

Implements
IOrganisation.Subsidiaries

IOrganisation.TrustedDomains

Declaration
IEnumerable<ITrustedDomain> IOrganisation.TrustedDomains { get; }
Returns
IEnumerable<ITrustedDomain>

Implements
IOrganisation.TrustedDomains

IEventSourced.ClearUncommittedEvents()

Declaration
void IEventSourced.ClearUncommittedEvents()
Implements
IEventSourced.ClearUncommittedEvents()

IEventSourced.GetUncommittedEvents()

Declaration
IEnumerable<IEvent> IEventSourced.GetUncommittedEvents()
Returns
IEnumerable<IEvent>

Implements
IEventSourced.GetUncommittedEvents()

IEventSourced.LoadFromEvents(IEnumerable<IEvent>)

Declaration
void IEventSourced.LoadFromEvents(IEnumerable<IEvent> events)
Parameters
IEnumerable<IEvent> events

Implements
IEventSourced.LoadFromEvents(IEnumerable<IEvent>)

IEventSourced.Version

Declaration
int IEventSourced.Version { get; set; }
Returns
System.Int32

Implements
IEventSourced.Version
Back to top Generated by DocFX