diff --git a/EntityFrameworkCore.Console/Program.cs b/EntityFrameworkCore.Console/Program.cs index 50bcd48..7524365 100644 --- a/EntityFrameworkCore.Console/Program.cs +++ b/EntityFrameworkCore.Console/Program.cs @@ -65,6 +65,9 @@ async Task RawSQLStatement() Console.WriteLine($"SQL Raw Team: {t.Name}"); } + // Note, that you cannot use JOINs in these SQL queries. + // Instead, the Include() function is used to add related data. + // FromSqlInterpolated is the revised form of FromSql, and a better choice. teams = context.Teams.FromSqlInterpolated($"SELECT * FROM Teams WHERE name = {teamName}"); foreach (var t in teams)