The FromSqlInterpolated method in Entity Framework Core is used to execute a raw query that contains interpolated parameters. Interpolated parameters are replaced with actual values at runtime, which helps to protect against SQL injection attacks. For simple queries like the example above, using LINQ would be preferable, both for safety and for leveraging the benefits.
Sort: