I have an Entity Framework model semi-working right now, but I'm having trouble performing a query to return database records with a Where() clause.
I am trying to line:
db.BlackstoneUsers.Where(u => u.Email == User.Email);
but I get the exception:
Expression cannot contain lambda expressions
I think this should be simple, but I'm just learning Entity and LINQ/Lambda.
Does anyone have any pointers?
try setting the email outside the call
var email = User.Email
db.BlackstoneUsers.Where(u => u.Email == email);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With