C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,394 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Friends I just have a question about the code below that uses Dapper to get data. I was wondering why do I need the code new{Id} and how does Dapper handle that one property. Thanks !
var output=_db.LoadDataItem<PayerModel, dynamic>(sql, new {Id}, connString);
the sql text should have parameter name @id. instead passing a parameter collection where each parameter has, a name, value and type, dapper uses reflection on the passed anonymous object.
see: