Add note about JOINs in SQL queries.

This commit is contained in:
Kevin Matsubara 2025-04-08 22:37:56 +02:00
parent 001e78736c
commit 1c48a8c9c9

View File

@ -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)