You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have a table auth with fields id and discord_id. I have such a model:
[Table("auth")]
public class AuthDataModel
{
[Key, Identity]
public int Id { get; set; }
public string DiscordId { get; set; }
}
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 DapperLib/Dapper#818
What is the possible solution other than marking all the underscore named columns with [Column("underscored_name")] ?
Thanks
The text was updated successfully, but these errors were encountered:
@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 DapperLib/Dapper#818
What is the possible solution other than marking all the underscore named columns with
[Column("underscored_name")]
?Thanks
The text was updated successfully, but these errors were encountered: