In Entity Framework 6, I can execute a raw SQL query on the database using the following command:
IEnumerable Contact.Database.SqlQuery
You can use ExecuteSqlCommandAsync method which is defined in RelationalDatabaseFacadeExtensions class of Microsoft.EntityFrameworkCore.Relational assembly by the following way.
ExecuteSqlCommandAsync
RelationalDatabaseFacadeExtensions
Microsoft.EntityFrameworkCore.Relational
_databaseContext.Database.ExecuteSqlCommandAsync()