ClickHouse.DapperExtensions icon indicating copy to clipboard operation
ClickHouse.DapperExtensions copied to clipboard

Async operations require use of a DbConnection or an IDbConnection where .CreateCommand() returns a DbCommand

Open mucahitimre opened this issue 3 years ago • 0 comments

I get such an error when using the InsertBulkAsync method, how can I solve it? error message: "Async operations require use of a DbConnection or an IDbConnection where .CreateCommand() returns a DbCommand"

this my code:

var task = conn.InsertBulkAsync(new List<Log>() { new Log
{
    Id = "lorem ipsum",
    DocumentId = "lorem ipsum",
    Date = DateTime.Now,
    Level = "lorem ipsum",
    Message = "lorem ipsum",
    Logger = "lorem ipsum"
}});

image

mucahitimre avatar Oct 10 '22 15:10 mucahitimre