Code: Select all
var entities = from entity in context.TESTVIEW
where entity.STATE == criteria.State
select entity;
type of criteria.State is String
value of criteria.State is "A"
connection string contains Unicode = true
The field STATE in database view TESTVIEW is defined as Char.
DbMonitor shows that the generated sql statement is equal with the generated sql statement of previous versions.
Code: Select all
SELECT
1 AS C1,
"Extent1".DESIGNER,
"Extent1".INFO,
"Extent1".SPKEY,
"Extent1".STATE
FROM (SELECT
TESTVIEW.DESIGNER,
TESTVIEW.INFO,
TESTVIEW.SPKEY,
TESTVIEW.STATE
FROM TESTVIEW) "Extent1"
WHERE :p__linq__0 = "Extent1".STATE
Code: Select all
var entities = (from entity in context.TESTVIEW
where criteria.State == entity.STATE
select entity);
Why the order in the where clause is important now or is it a bug?