Skip to content

Does not work with OleDbConnection #145

@DrViente

Description

@DrViente

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions