【发布时间】:2012-07-24 08:11:33
【问题描述】:
是否可以使用 ormLite 来使用存储过程,只需购买传递对象,而不使用 Parameters.Add。像这样的东西。但是这个trow错误过程或函数'SuspendUser'需要参数'@ID',它没有提供。
db.Query<User>("SuspendUser", new { ID = 21 });
【问题讨论】:
标签: c# asp.net ormlite-servicestack
是否可以使用 ormLite 来使用存储过程,只需购买传递对象,而不使用 Parameters.Add。像这样的东西。但是这个trow错误过程或函数'SuspendUser'需要参数'@ID',它没有提供。
db.Query<User>("SuspendUser", new { ID = 21 });
【问题讨论】:
标签: c# asp.net ormlite-servicestack
有一个discussion here(除非它已经改变了)可能很有趣。特别要注意他提到的“dapper”语法,它可以翻译为:
var data = db.Query<User>("SuspendUser", new { ID = 21 },
commandType: CommandType.StoredProcedure);
【讨论】: