public static bool UpdateUser(LinkAddressInfo linkAddress) { using (DapperDb db = DapperDbFactory.CreateDb()) { return(db.Update <LinkAddressInfo>(linkAddress)); } }
public static bool UpdateUser(FateUserInfo user) { using (DapperDb db = DapperDbFactory.CreateDb()) { return(db.Update <FateUserInfo>(user)); } }
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)); } }
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)); } }