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
schotime edited this page Nov 10, 2012
·
2 revisions
Using the methods SingleInto, SingleOrDefaultInto, FirstInto and FirstOrDefaultInto it is possible to map columns from the database onto an existing object. Only the columns in the query will be set on the existing object.
publicclassUser{publicintUserId{get;set;}publicstringEmail{get;set;}}varuser=newUser(){UserId=1};IDatabasedb=newDatabase("connStringName");db.SingleOrDefaultInto(user,"select Email from users where userid = @0",1);