Closed b2soft closed 1 year ago
@b2soft SqlGenerator doesn't read Dapper.DefaultTypeMap.MatchNamesWithUnderscores
. Current solution only with [Column("underscored_name")]
Are there any plans to support such flag?
@b2soft Flag about mapping, not about sql generation... I guess you want support naming conventions in SqlGenerator. If you have time feel free to implement it and raise a PR.
Hello. I have a table
auth
with fieldsid
anddiscord_id
. I have such a model:Dapper is configured to ignore underscores:
Dapper.DefaultTypeMap.MatchNamesWithUnderscores = true;
Now when I try to get all the records using
var foundUsers = (await m_authRepository.FindAllAsync()).ToList();
I get an error:42703: column auth.discordid does not exist
While this call works correctly:await m_authRepository.Connection.QueryAsync<AuthDataModel>("SELECT * FROM auth")).ToList();
May be related to https://github.com/DapperLib/Dapper/issues/818What is the possible solution other than marking all the underscore named columns with
[Column("underscored_name")]
?Thanks