/**
     * Creates a new instance.
     * @param  {string} createdOn - The date/time when the model was created.
     * @param  {string} createdBy - The name of the user that created the model.
     */
    constructor(createdOn: string, createdBy: string) {
        Verify.that(createdOn, 'createdOn').isNotNullOrEmpty();
        Verify.that(createdBy, 'createdBy').isNotNullOrEmpty();

        this.CreatedOn = createdOn;
        this.CreatedBy = createdBy;
    }
    /**
     * Creates a new instance.
     * @param  {ISqlDatabase} database - The database instance.
     * @param  {ISqlCallFactory} callFactory - The ISqlCallFactory used to create SqlCall instances.
     */
    constructor(database: ISqlDatabase, callFactory: ISqlCallFactory) {
        Verify.that(database, 'database').isNotNull();
        Verify.that(callFactory, 'callFactory').isNotNull;

        this._database = database;
        this._callFactory = callFactory;
    }
   /**
    * Creates a new instance.
    * @param  {ISqlDatabase} database - The database instance.
    * @param  {ISqlCommand} dbCommand - The command that represents the statements executed against the database.
    */
   constructor(database: ISqlDatabase, dbCommand: ISqlCommand) {
      Verify.that(database, 'database').isNotNull();
      Verify.that(dbCommand, 'dbCommand').isNotNull();

      this._database = database;
      this._dbCommand = dbCommand;
   }
   /**
    * Creates a new instance.
    * @param  {ISqlDatabase} sqlDatabase - The database instance.
    * @param  {IQuerySqlCallDelegate<T>} delegate - The delegate used to execute the call.
    */
   constructor(sqlDatabase: ISqlDatabase, delegate: ISqlCallDelegate<T>) {
      Verify.that(sqlDatabase, 'sqlDatabase').isNotNull();
      Verify.that(delegate, 'delegate').isNotNull();

      this._sqlDatabase = sqlDatabase;
      this._delegate = delegate;
   }
   /**
    * Creates a new instance.
    * @param  {number} version - The version number.
    * @param  {string} versionOn - The date/time when the update occurred.
    * @param  {string} versionBy - The name of the user that performed the update.
    */
   constructor(version: number, versionOn: string, versionBy: string) {
      Verify.that(version, 'version').isNotNull();
      Verify.that(versionOn, 'versionOn').isNotNullOrEmpty();
      Verify.that(versionBy, 'versionBy').isNotNullOrEmpty();

      this.Version = version;
      this.VersionOn = versionOn;
      this.VersionBy = versionBy;
   }
   /**
    * Creates a new instance.
    * @param  {ISqlDatabase} database - The database instance.
    * @param  {ISqlCommand} dbCommand - The command that represents the statement executed against the database.
    * @param  {ISqlDataReader} reader - The reader that contains the result sets returned by the statement.
    */
   constructor(database: ISqlDatabase, dbCommand: ISqlCommand, reader: ISqlDataReader) {
      super(database, dbCommand);

      Verify.that(reader, 'reader').isNotNull();

      this.reader = reader;
   }
    /**
     * Executes the specified command against the database.
     * @param  {ISqlCallDelegate<T>} callDelegate - The delegate used to execute the call.
     * @returns Promise - The result returned by the call.
     */
    protected async execute<T>(callDelegate: ISqlCallDelegate<T>): Promise<T> {
        Verify.that(callDelegate, 'callDelegate').isNotNull();

        const sqlCall = this._callFactory.getSqlCall<T>(this._database, callDelegate);

        return await sqlCall.execute();
    }
   /**
    * Creates an instance of NamedModelId.
    *
    * @param {string} name - The name of the underlying model.
    * @param {string} modelKey - The unique identifier of the underlying model.
    * @param {number} [version] - The version number.
    */
   constructor(name: string, modelKey: string, version?: number) {
      super(modelKey, version);

      Verify.that(name, 'name').isNotNullOrEmpty();

      this.Name = name;
   }
  /**
   * Creates a new instance.
   * @param  {ModelId} modelId - The unique identifier of the model instance.
   */
  constructor(modelId: ModelId) {
    Verify.that(modelId, 'modelId').isNotNull();

    this.ModelId = modelId;
  }
  /**
   * Creates a new instance.
   * @param  {string} modelKey - The unique identifier of the model instance.
   * @param  {number=0} version - The version number of the model instance.
   */
  constructor(modelKey: string, version: number = 0) {
    Verify.that(modelKey, 'modelKey').isNotNullOrEmpty();

    this.ModelKey = modelKey;
    this.Version = version || 0;
  }