You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below you can see that only the where is specified. If you don't explicitly supply the select clause it will be automatically generated for you and the where will then be appended.
Useru=db.Single<User>("where emailaddress = @0","email@domain.com");orUser u =db.Single<User>("select u.* from users u where emailaddress = @0","email@domain.com");
Both these methods have a 'OrDefault' method if you are unsure that the object will exist. If it doesn't exist and you don't use the 'OrDefault' override it will throw an exception.
There are also First<T> and FirstOrDefault<T> which will not throw an exception if more than 1 record is returned.