zzzprojects / Dapper-Plus

Dapper Plus - High-Efficient Bulk Actions (Insert, Update, Delete, and Merge) for .NET
https://dapper-plus.net/
383 stars 85 forks source link

The Provider could not be resolved. You must explicitly set the Provider #64

Closed IranthaJ closed 4 years ago

IranthaJ commented 4 years ago

I am using Mono.Data.Sqlite as my database and I am trying to make a bulk insert. It returns the above error. I noticed your documentation has mentioned that DapperPlus supports Sqlite. Am I doing anything wrong?

using Mono.Data.Sqlite;
using Z.Dapper.Plus;
...

string DB_PATH = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "mydb.db");
IDbConnection conn = new SqliteConnection("Data Source=" + DB_PATH + ";Pooling=False;");
DapperPlusManager.Entity<Session>().Table(tableName).Identity(x => x.Id);
List<Session> sessionList = new List<Session>();
for (var i = 1; i <= recordCount; i++)
{
      sessionList.Add(new Session() { Id = i, Name = "My session " + i, Code = "My Code " + i });
}
conn.BulkInsert(sessionList); // Error
JonathanMagnan commented 4 years ago

Hello @IranthaJ ,

We support SQLite : https://www.nuget.org/packages/System.Data.SQLite

But not the Mono.Data.Sqlite provider.

Is it possible for you to switch of provider? I don't think we have short term plan to support providers in Mono as people will eventually switch to .NET Core.

Best Regards,

Jon

JonathanMagnan commented 4 years ago

Hello @IranthaJ ,

Since our previous conversation, we haven't heard from you.

as mentioned in my previous message, would it be possible to switch off the provider?

Don't hesitate to contact us for further assistance.

Best regards,

Jon

JonathanMagnan commented 4 years ago

Hello @IranthaJ

A simple reminder that we are here to assist you.

would it be possible to switch off the provider?

Don't hesitate to contact us for further assistance.

Best regards,

Jon