I have the following code in the application
var query = context.xosAssets.Where(x => x.GSA == 0).Take(INDEX_ASSET_QUERY_COUNT); var assets = query.ToList();
When this is done, query.Count() is zero, and assets.Count is zero because the results are not returned. However, this is not true, since ALL records in this database have a GSA field set to zero.
When I take the output from query.ToString() and run it (replacing @p0 with 0), I get all the correct answers. I checked that I am "in the same database that displays context.Connection.Database , and I am running out of options, which may be incorrect.
Why doesn't Linq-to-sql return any results even if the actual sql does?
source share