Open JN-Lemon opened 1 year ago
I believe the issue lies in DapperImplementor.cs
within the InternalUpdate
method starting at line 745
At line 751 it attempts to build the dynamic parameters but instead of building the @u_0 parameter the DynamicParameters contains a parameter at the bottom with the key column name like "Id_0"
The sql that's generated however is trying to update the key column with parameter "@u_0"
Which begs another question, why is the update trying to change the primary key column?
Database: SQL Server 2019
The POCO is just a generic class I whipped up that abides by the standards set in this repo. My key column is "Id" but it fails to properly map this column during an attempt to update.
I've downloaded the source and stepped through the code as it's trying to perform the SQL generation but I'm not seeing a @u_0 parameter being created in the DynamicParameters. @valfrid-ly I'm willing to dig in and help you figure this one out but it's well over my head. This seems like this bug breaks the usability of this entire library as an update crud operation is pretty significant.