IHasCompanyCompanyId Property

Represents the CompanyDto owning this object.

Definition

Namespace: MobileTrack.Common.Interfaces
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
Guid CompanyId { get; }

Property Value

Guid

Remarks

  • Ownership – If the object is not owned by a company, it means the object is available for all companies and is to be maintained by MobileTrack support.
    If so, property should be set to Empty. This is valid for MapMarkerDto's, ActionFlowDefinitionDto's (and their assignments), RoleDto's and TemplateDto's.
  • Immutability – Objects that were part of a company cannot be moved to another company or be made company-agnostic. (or vice versa).
    If we want to move an AccountDto or DeviceDto to another CompanyDto, it must first be removed and then re-created.
    (Because otherwise logs, etc. could carry over, causing us to violate government compliance regulations)
  • Referential integrity – If objects exist that refer to a CompanyDto, then not only must that company exist, that company cannot be permanently
    deleted until all dependent objects have been deleted!
  • Multi-tenancy Isolation – The Company ID property is often used in the Azure Cosmos DB containers to partition data based on which customer owns said data.
    This is done deliberately, to ensure data from customer A doesn't mingle with data from customer B.

See Also