Typecasting Database.query List Result To Map

Sample Code:

String soqlQuery = 'Select Id, Name From Account';
Map <Id, Account> accountMap = new Map<Id, Account>(
    (List<Account>)Database.query(soqlQuery)
);
System.debug('AccountMap-' + accountMap);