With an [EnumAsInt] named SystemState…
This query works…
var location = sqlXrm.Single<Location>(l => l.StateCode == SystemState.Active);
… but this errors with “Conversion failed when converting the varchar value ‘Active’ to data type int”…
var location = sqlXrm.Single<Location>(l => l.StateCode.Equals(SystemState.Active));
It’s not a big deal but I’m keep falling foul of it because I’m used to the .Equals syntax. Any way I can get the latter to work?
–
Pete