-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dapper.Contrib 1.50.0 -> 1.50.4 broke InsertAsync(IEnumerable) #930
Comments
snebjorn
changed the title
Dapper.Contrib 1.50.0 -> 1.50.4 broke InsertAsync<T>(IEnumerable<T>)
Dapper.Contrib 1.50.0 -> 1.50.4 broke InsertAsync(IEnumerable)
Jan 30, 2018
It's this line that's causing the issue. |
What are you trying to insert? What does that type look like? |
This doesn't throw var list = new List<object>();
await _connection.InsertAsync(list); This throws var list = new List<object>().AsEnumerable();
await _connection.InsertAsync(list); // throws Hmm perhaps I should mention that I made my own adapter around Dapper.Contrib. But it only forwards the call. // _connection here is of type IDbConnection where as in the above is using my adapter interface.
public Task<int> InsertAsync<T>(T entityToInsert) where T : class => _connection.InsertAsync(entityToInsert);
public Task<int> InsertAsync<T>(IEnumerable<T> entitiesToInsert) where T : class => _connection.InsertAsync(entitiesToInsert); It shouldn't interferer with Dapper. |
This was referenced Feb 17, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't quite pinpoint what is going on. But when I update Dapper.Contrib from 1.50.0 to 1.50.4 I get this exception
When calling
await _connection.InsertAsync(listOfEntities);
.Anyone else getting this?
My Dapper version is 1.50.4. It works with this version combo:
The text was updated successfully, but these errors were encountered: