Prado\Data\Common\Mssql\TMssqlCommandBuilder::getLastInsertID PHP Method

getLastInsertID() public method

Overrides parent implementation. Uses "SELECT @@Identity".
public getLastInsertID ( ) : integer
return integer last insert id, null if none is found.
    public function getLastInsertID()
    {
        foreach ($this->getTableInfo()->getColumns() as $column) {
            if ($column->hasSequence()) {
                $command = $this->getDbConnection()->createCommand('SELECT @@Identity');
                return intval($command->queryScalar());
            }
        }
    }