I’m using ADO.Net to access a database. But right now, I’m trying to recover some information, but I can’t remember how to use the .where<>clause.
Here the code:
string sql = "Id = '" + identifier + "'";
USER u = db.USER.Where(sql).First<USER>();
Where dbis the Entity Model, but I fail to remember how to use this Where<> clause…
Anybody can help?
you can use lambda expression :
or you can write your query this way :
and here is another way to use lambda expressionn :