Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

'Where' queries in EFCodeFirst???

$
0
0
'Where' queries in EFCodeFirst???
West Wind Web Toolkit for ASP.NET
'Where' queries in EFCodeFirst???
Dec. 9, 2012
07:36 pm
3NW1612GMShow this entire thread in new window
Gratar Image based on email address
From:Matt Slay
To:Rick Strahl
Rick - I see the basic Load() method in EfCodeFirst for fetching a record by ID.

However, can you please advise the correct usage of EfCodeFist to perform a "Where" query so we can pass in a match (lambda) criteria to return a collection of matching records?

Example:

var quotes = db.Quotes.Where(x => x.cust_num == "DNT001");

If we need this kind of query, are we supposed to drop back to native EF contexts and call per the above? Or is there a certain way we can make this call with your EfCodeFirst?


Viewing all articles
Browse latest Browse all 10393

Trending Articles