【用Dapper调用存储过程】临文乍了了,彻卷兀若无。这篇文章主要讲述用Dapper调用存储过程相关的知识,希望能为你提供帮助。
public PageModel Get(int PageIndex = 1, int PageSize = 5, int Pid = 0, int Tid = 0, int Gid = 0) { DynamicParameters sp = new DynamicParameters(); sp.Add("@PageIndex", PageIndex); sp.Add("@PageSize", PageSize); sp.Add("@Pid", Pid); sp.Add("@Tid", Tid); sp.Add("@TotalCount", dbType: DbType.Int32, direction: ParameterDirection.Output); PageModel model = new PageModel() { data = https://www.songbingjia.com/android/conn.Query< GoodsModel> ("G_Page", sp, commandType: CommandType.StoredProcedure).ToList(), TotalCount = sp.Get< int> ("@TotalCount") }; if (Gid!=0) { model.data= https://www.songbingjia.com/android/model.data.Where(s=> s.Gid==Gid).ToList(); } return model; }
推荐阅读
- Deploying an Application
- 使用create-react-app构建的项目(并引入react-app-polyfill做IE兼容)在开发环境下的IE浏览器中报错的解决方案
- 使用MuMu模拟器调试AndroidStudio项目
- uni-app运行到手机报错Component constructors should be called while initialization. A constructor call has
- android与H5
- android Q(10) 拍照相机 照片存入失败
- android studio 入门坑
- iphone上传拍照图片时图片会旋转90度,从相册选择就不会,安卓手机也不会,怎么解决()
- Sapphire: Copying GC Without Stopping the World