Does not work with OleDbConnection
DrViente opened this issue · 1 comments
DrViente commented
Good morning everyone.
I figured out that Dapper.Contrib does not support OleDbConnection, that because, for example on the Get function of SqlMapperExtensions.cs do:
var type = typeof(T);
if (!GetQueries.TryGetValue(type.TypeHandle, out string sql))
{
var key = GetSingleKey<T>(nameof(Get));
var name = GetTableName(type);
sql = $"select * from {name} where {key.Name} = @id";
GetQueries[type.TypeHandle] = sql;
}
var dynParams = new DynamicParameters();
dynParams.Add("@id", id);
the "@" notation is not supported on OleDb, for my example I need to operate bot SQL Server and MS Access DB and OleDBConnection is the only way to accomplished both connection
There is a plan to support OleDbConnection "?" notation?
Deleted user commented
I just made a pull request fixing just this. Maybe you can try if it works for you aswell?