public EditionTdm FindById(IDbSession sess, long id) { SqlSelect ss = new SqlSelect(sess); ss.Sql = SelectEdition; ss.Where = "u.ng_id=@userId"; ss.AddParam("@userId", id); return(ss.ExecuteSingle <EditionTdm>()); }
public OAuthTdm FindByOpenId(IDbSession sess, OAuthKind kind, string openId) { SqlSelect ss = new SqlSelect(sess); ss.Sql = SelectSQL; ss.Where = " m.nt_kind=@nt_kind and m.sz_open_id=@sz_open_id"; ss.AddParam("@nt_kind", (int)kind).AddParam("@sz_open_id", openId); return(ss.ExecuteSingle <OAuthTdm>()); }
public UserTdm FindByMobile(IDbSession sess, string mobile) { SqlSelect ss = new SqlSelect(sess); ss.Sql = SelectUser; ss.Where = "u.sz_email=@sz_email"; ss.AddParam("@sz_email", mobile); return(ss.ExecuteSingle <UserTdm>()); }
public UserTdm FindByEmail(IDbSession sess, string email) { SqlSelect ss = new SqlSelect(sess); ss.Sql = SelectUser; ss.Where = "u.sz_mobile=@sz_mobile"; ss.AddParam("@sz_mobile", email); return(ss.ExecuteSingle <UserTdm>()); }
public UserTdm FindByUserName(IDbSession sess, string username) { SqlSelect ss = new SqlSelect(sess); ss.Sql = SelectUser; ss.Where = "u.sz_uname=@uname"; ss.AddParam("@uname", username); return(ss.ExecuteSingle <UserTdm>()); }