public static bool UpdateUser(LinkAddressInfo linkAddress)
 {
     using (DapperDb db = DapperDbFactory.CreateDb())
     {
         return(db.Update <LinkAddressInfo>(linkAddress));
     }
 }
Example #2
0
 public static bool UpdateUser(FateUserInfo user)
 {
     using (DapperDb db = DapperDbFactory.CreateDb())
     {
         return(db.Update <FateUserInfo>(user));
     }
 }
Example #3
0
 public static IList <FateUserInfo> GetUserList()
 {
     using (DapperDb db = DapperDbFactory.CreateDb())
     {
         return(db.Query <FateUserInfo>());
     }
 }
        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 IList <LinkAddressInfo> GetLinkList(LinkAddressType type)
        {
            using (DapperDb db = DapperDbFactory.CreateDb())
            {
                SqlQuery filter = SqlQuery <LinkAddressInfo> .Builder(db).AndWhere(o => o.LinkType, FilterExpression.Equal, (int)type);

                return(db.Query <LinkAddressInfo>(filter));
            }
        }
Example #6
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));
            }
        }