When using EF Core, the default configuration will not warn you (with a run-time error) if you are using a Linq query that EF Core cannot evaluate. This will result in the query being run in a manner that might not be as expected. For example:

var query = context
    .Where(x => x.Url.Equals("", StringComparison.OrdinalIgnoreCase));
var results = query.ToList();

The overloaded Equals method with the StringComparison argument is not something EF Core understands. As a result, the generated query has no WHERE clause and it retrieves all the records from the Blog table, until a match is found. In other words, if you expected it to generate this:

SELECT BlogId, Url

Or something similar, you are going to be disappointed. It actual generates this:

SELECT BlogId, Url

To avoid this behavior, you can configure EF Core to throw a runtime error if it encounters something it cannot covert into a SQL statement.

When configuring the options, set the following:

    .ConfigureWarnings(warnings => warnings.Throw(RelationalEventId.QueryClientEvaluationWarning))

Then you will know when your EF-generated queries is not quite what you might have expected.