Tenant

Tenant implements a data model for tenants information.

Namespace:
Inetdev.Multitenancy.DataModels
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
Inetdev.Data.DataModel
Implements:
System.IEquatable{Inetdev.Multitenancy.DataModels.Tenant}, Inetdev.Multitenancy.ITenant, Inetdev.Data.IIdentifiable

Constructors

Tenant

Default constructor

Signature:
public Void Tenant()

Tenant

Initializes a new instance of Tenant.

Signature:
public Void Tenant(id)
Parameters
Name Type Summary
id Int32 Tenant Id.

Properties

Culture

Culture name.

Signature:
public String Culture { get; set; }

DatabaseName

The name of the database that this tenant use.

Signature:
public String DatabaseName { get; set; }

DatabasePassword

Database password.

Signature:
public String DatabasePassword { get; set; }

DatabaseServerId

Database server ID.

Signature:
public String DatabaseServerId { get; set; }

DatabaseUserName

Database user name.

Signature:
public String DatabaseUserName { get; set; }

DisplayName

Display name of this tenant.

Signature:
public String DisplayName { get; set; }

Email

Primary tenant's e-mail.

Signature:
public String Email { get; set; }

EnforceModelValidation

Gets whether the model validation must be enforced.

Signature:
public Boolean EnforceModelValidation { get; }

Id

Tenant Id.

Signature:
public Int32 Id { get; set; }

Identification

Object identification.

Signature:
public Identification Identification { get; }

MailFromAddress

Address from which mails are sent.

Signature:
public String MailFromAddress { get; set; }

MailFromName

Display name for sending address.

Signature:
public String MailFromName { get; set; }

MailServerId

Mail server ID.

Signature:
public String MailServerId { get; set; }

Name

The name or code of the tenant.

Signature:
public String Name { get; set; }

Protocol

Protocol that identify this object.

Signature:
public String Protocol { get; }

ProtocolCaption

Localized caption for this object.

Signature:
public String ProtocolCaption { get; }

ProvisionState

State of tenant provisioning.

Signature:
public ProvisionState ProvisionState { get; set; }

Ring

Ring number.

Signature:
public Int32 Ring { get; set; }

SubscriptionState

State of tenant subscription

Signature:
public SubscriptionState SubscriptionState { get; set; }

SubscriptionStateComment

A comment about the subscription state.

Signature:
public String SubscriptionStateComment { get; set; }

TrialDurationInDays

Trial duration in days.

Signature:
public Nullable<Int32> TrialDurationInDays { get; set; }

TrialEndsUtc

Date and time that the trial period ends or ended.

Signature:
public DateTime TrialEndsUtc { get; set; }

TrialStartedUtc

Date and time that the trial period has started.

Signature:
public DateTime TrialStartedUtc { get; set; }

Methods

Equals

Indicates whether the current object is equal to another object of the same type.

Signature:
public Boolean Equals(other)
Parameters
Name Type Summary
other Tenant The object to compare this object to.

Equals

Indicates whether the current object is equal to the obj object.

Signature:
public Boolean Equals(obj)
Parameters
Name Type Summary
obj Object The object to compare this object to.

GetHashCode

Serves as the default hash function. Not required, implemented to avoid compiler warning.

Signature:
public Int32 GetHashCode()

GetObject

Loads an instance of the Tenant identified by identification.

Signature:
public Object GetObject(identification)
Parameters
Name Type Summary
identification Identification Tenant identification.
Exceptions
Type Summary
ArgumentNullException Thrown when identification is null.
FrameworkException Thrown when the protocol does not match.

GetObjectAsync

Loads an instance of the Tenant identified by identification.

Signature:
public Task<Object> GetObjectAsync(identification)
Parameters
Name Type Summary
identification Identification Tenant identification.
Exceptions
Type Summary
ArgumentNullException Thrown when identification is null.
FrameworkException Thrown when the protocol does not match.

Load

Initializes a new instance of Tenant and loads it data from the underlaying repository.

Signature:
public Tenant Load(id)
Parameters
Name Type Summary
id Int32 Object Id.

LoadAsync

Initializes a new instance of Tenant and loads it data from the underlaying repository asyncronously.

Signature:
public Task<Tenant> LoadAsync(id)
Parameters
Name Type Summary
id Int32 The identification of the object.

ToString

Returns a textual representation of the Tenant.

Signature:
public String ToString()

Validate

Checks whether the object is valid for saving.

Signature:
public Void Validate()
Exceptions
Type Summary
ValidationException Thrown when the object is not valid.