作個記錄:ide
var pCount = this._dataProvider.GetParameter(); pCount.ParameterName = "totalCount"; pCount.Direction = ParameterDirection.Output; pCount.DbType = DbType.Int32; var list = this._dbContext.SqlQuery<User>("exec P_GetList @totalCount out", pCount).ToList();
必需要加 .ToList(),不然獲取不到 存儲過程 的 Output 參數this