Esempio n. 1
0
        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));
            }
        }
Esempio n. 2
0
        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));
            }
        }