public static LinkAddressInfo GetLinkInfo(string linkAddress) { using (DapperDb db = DapperDbFactory.CreateDb()) { SqlQuery filter = SqlQuery <LinkAddressInfo> .Builder(db).AndWhere(o => o.LinkAddress, FilterExpression.Equal, linkAddress); return(db.SingleOrDefault <LinkAddressInfo>(filter)); } }
public static FateUserInfo GetUser(string userCode) { using (DapperDb db = DapperDbFactory.CreateDb()) { SqlQuery filter = SqlQuery <FateUserInfo> .Builder(db).AndWhere(o => o.UserCode, FilterExpression.Equal, userCode); return(db.SingleOrDefault <FateUserInfo>(filter)); } }