I've tried a couple of ways to execute a simple query but without success.
var result = db.Persons.Where("surname = bob");
The above will give the error: No property or field 'bob' exists in type 'Person'
var result = db.Persons.Where("surname = 'bob'");
The above will give the error: Character literal must contain exactly one character
Has anyone else had these problems and what did you do?
Isn't Dynamic LINQ suppose to work like this or are there older versions or something?
I've added the Dynamic.cs
to my project and I'm using System.Linq.Dynamic
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…