Reputation: 127
Is it possible to consume store procedure with ormLite just buy passing object, without using Parameters.Add. Something like this. But this trow error Procedure or function 'SuspendUser' expects parameter '@ID', which was not supplied.
db.Query<User>("SuspendUser", new { ID = 21 });
Upvotes: 1
Views: 345
Reputation: 1064114
There's a discussion here which (unless it has changed since) may be interesting. In particular, note the "dapper" syntax he remarks on, which would translate as:
var data = db.Query<User>("SuspendUser", new { ID = 21 },
commandType: CommandType.StoredProcedure);
Upvotes: 1