-
Notifications
You must be signed in to change notification settings - Fork 302
Finding data
stack72 edited this page Oct 15, 2010
·
10 revisions
The dynamic Table properties exposed by the Database object will accept a variety of methods starting with Find. Methods starting with FindBy return a single dynamic
object; methods starting with FindAllBy return an IEnumerable<dynamic>
.
Simple.Data:
db.Users.FindByNameAndPassword(name, password)
SQL:
SELECT * FROM Users WHERE Name = @Name and Password = @Password
Simple.Data:
db.Users.FindAllByName(name)
SQL:
SELECT * FROM User Where Name = @Name