-
Let's say we have two variables. Right now Norm support parameters by position like below: Does Norm support anonymous class parameter? Or simplified version? By the way, for position parameters, what happen if there's repeat parameters in the query? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Unfortunately, no at this moment. However, currently, there are several ways to pass parameters by name. For example: You can pass a normal, non-anonymous class instance. Example. Or, my favorite approach, you can pass a name-value tuple array like this: connection.Read<T>("select @p1, @p2, @p3", ("p1", 1), ("p2", 2), ("p3", 3)); Where p1 maps to @p1 and so on ... But you are right, it should support anonymous class parameters. And I will be looking to add that support today and release a new version. I'll let you know soon as it is done.
Nothing good. Your parameters will mix. Here is an example:
I'll be looking to add an exception with a friendly message too. |
Beta Was this translation helpful? Give feedback.
-
I've released a new version with those changes: |
Beta Was this translation helpful? Give feedback.
I've released a new version with those changes:
https://github.com/vb-consulting/Norm.net/blob/master/CHANGES.md#337