c# - Inserting into Table 'User' with Dapper.Rainbow -
i using dapper.rainbow , have come across issue when inserting table named 'user'.
i can other tables work perfectly, when try insert users
table fail.
i have used sql query inspector determine generated query not have [ ]
around table name. once recraft query square brackets, works fine.
when use table<user>(this, "[users]");
set private property likelytablename
correct value ([user]
).
however database.init(dbconn,3);
change likelytablename
string user
.
i have been checking out dapper-dot-net github project , looked through database.cs source dapper.rainbow, @ loss parts of in il.
is there way dapper.rainbow work table named user
??
it bad idea use reserved words table (or field, view etc) names. think causing problems. better bite bullet once , change name, fight forever.
for reference, here list of reserved words (to avoid):
Comments
Post a Comment