mikependon / RepoDB

A hybrid ORM library for .NET.
Apache License 2.0
1.69k stars 124 forks source link

'SqlConnection' does not contain a definition for 'BulkInsertAsync' #946

Closed nandaccio closed 2 years ago

nandaccio commented 2 years ago

Hi,

I am not sure whether it's an expected behaviour or not, but after updating RepoDB packages as follows:

"RepoDb" version="1.12.9" targetFramework="net48" "RepoDb.MySql" version="1.1.5" targetFramework="net48" "RepoDb.SqlServer" version="1.1.5-beta1" targetFramework="net48" "RepoDb.SqlServer.BulkOperations" version="1.1.6-beta1" targetFramework="net48"

I started getting this error message: 'SqlConnection' does not contain a definition for 'BulkInsertAsync' and the best extension method overload 'SqlConnectionExtension.BulkInsertAsync(SqlConnection, IEnumerable, IEnumerable, SqlBulkCopyOptions?, string, int?, int?, bool?, bool?, SqlTransaction, CancellationToken)' requires a receiver of type 'SqlConnection'

Is it caused by this change:

https://twitter.com/mike_pendon/status/1441499327814422530?s=20

?

mikependon commented 2 years ago

Yes, it is expected. The latest beta versions of RepoDb.SqlServer and RepoDb.SqlServer has already eliminated the SDS. If you still would like to work with SDS, you have to bootstrap it explicitly, see here.

The other solutions are:

Everything is in your perusal.

We will never issue an actual release until the beta releases that removes the SDS is matured enough. Hope this helps!

nandaccio commented 2 years ago

Thank you for your reply! Now everything is clear :)

The issues were limited to a legacy module still based on SDS, now I switched to MDS (and I will report issues, if any)