Raw SQL is still parameterized by EF Core, so you can (and should) avoid SQL injection while keeping control over the exact SQL. FromSqlRaw uses SQL with placeholders ({0}, {1}, …) or named parameters ...