先確定已經安裝 Chloe 組件後將 MySqlContext 加入組件
69059-p5rx6kxlnf.png

接著在 System 中完成讀取配置跟連接
22270-amvn97ot2re.png

mysql 配置如下
92468-dxzfrkvkz2.png

獲取數據

List<Tbl_UserStageInfo> userStageInfos = mySqlComponent.dbContext.Query<Tbl_UserStageInfo>().Where(item => item.UserId == UserId).ToList();

更新數據

mySqlComponent.dbContext.Update<Tbl_UserStageInfo>(userStageInfo);

标签: none

添加新评论