Page 1 of 1

Entity Framework 6.3 + .NET Core 3 support status

Posted: Tue 21 May 2019 06:20
by bairog
Hello.
I'm using dotConnect for SQLite 5.11.1202 and I'm trying to test Entity Framework 6.3 (it supports .NET Core 3).
I'm using latest Entity Framework 6.3 preview 5 and Visual Studio 2019 16.1.0.
On .NET Framework 4.8 my test application is working correctly, but on .NET Core 3 preview 5 I have an exception
MissingMethodException: Method not found: 'System.String System.AppDomainSetup.get_LicenseFile()'
So does dotConnect for SQLite support Entity Framework 6.3 + .NET Core 3 for now? If yes - what's wrong with my code? If no - when are you planning to begin?

I've uploaded my application here. Just copy Users.db to C:\Users.db, compile and run to get an error.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Tue 21 May 2019 19:11
by Shalex
EF Core is the only EF version supported by Devart.* .NET Standard assemblies at the moment.

We will add support for EF6.3 in our provider after .NET Core 3.0 (with EF6.3 support) is released.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Thu 23 May 2019 10:41
by bairog
Shalex wrote: Tue 21 May 2019 19:11We will add support for EF6.3 in our provider after .NET Core 3.0 (with EF6.3 support) is released.
As I can see from this blog post here, the roadmap for .NET Core/.NET looks like this:
Image
So we are talking about adding support for EF6.3 in your provider in July 2019 (.NET Core 3.0 RC), right?

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Fri 24 May 2019 12:29
by Shalex
We are planning to implement the feature in Sept 2019 (.NET Core 3.0 GA).

If there are no significant difficulties for the EF6.3 support on our side, we will provide it in July 2019 (.NET Core 3.0 RC).

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Mon 29 Jul 2019 12:06
by bairog
Hello.
.NET Core Preview 7 is out and it is considered to be the first RC.
Looking forward to the version of provider that supports Entity Framework 6.3 Preview 7.
Thank you in advance.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Thu 05 Sep 2019 12:17
by bairog
Hello.
Entity Framework 6.3 preview 9 is out and it's considered to be the last preview before release at September 23.
So how your work is going for now?
Is there a beta version of provider to test?

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Fri 06 Sep 2019 17:35
by Shalex
bairog wrote: Thu 05 Sep 2019 12:17Is there a beta version of provider to test?
We have just sent the internal build to your email. If you encounter any issue, please contact us.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Mon 09 Sep 2019 07:00
by bairog
I've ported my test app from EF 6.2 (.NET 4.0) to EF 6.3 preview 9(.NET Core 3 preview 9).
My app is a library so it has no config file and I have to add data provider programmatically.

Instead of previously used:

Code: Select all

var dataTable = (ConfigurationManager.GetSection("system.data") as System.Data.DataSet).Tables[0];

//if DbProviderFactory with the same name already exists in system - need to delete it first
foreach (DataRow row in dataTable.Rows)
       if (row[2].Equals(SQLiteConnectionInfo.InvariantName))
       {
              row.Delete();
              row.AcceptChanges();
              break;
        }

//add Data Provider
dataTable.Rows.Add("dotConnect for SQLite",
         "dotConnect for SQLite",
         SQLiteConnectionInfo.InvariantName,
         "Devart.Data.SQLite.SQLiteProviderFactory, Devart.Data.SQLite, Culture=neutral, PublicKeyToken=09af7300eec23701");
now I'm using:

Code: Select all

DbProviderFactories.RegisterFactory(SQLiteConnectionInfo.InvariantName, new SQLiteProviderFactory());
But on the line

Code: Select all

Database.SetInitializer(new MigrateDatabaseToLatestVersion<MyDbContext, MyDbContextMigrationConfiguration>());
I get an error:
System.TypeInitializationException: FileNotFoundException Could not load file or assembly 'System.Configuration.ConfigurationManager, Version 4.0.2.0'
I've added a reference to the latest version (4.700.19.42104) of System.Configuration.ConfigurationManager.dll - but nothing changed.

I've uploaded my test app here

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Tue 10 Sep 2019 15:49
by Shalex
1. Please download NuGet packages using the link from our email and unpack it.

2. Open your project in VS2019 v16.3 Preview, remove the existing assembly references from the project DataAccessLayer.

3. Navigate to Tools > NuGet Package Manager > Package Manager Console. Press the wheel (Settings) > Package Sources, add a local source and set it to the folder where you unpack the Devart NuGet packages.

4. In Package Manager Console, set Package source to your local source, Default project=DataAccessLayer and run:
PM> install-package devart.data.sqlite.ef6 -pre

5. Specify your key in the License Key connection string parameter. You can get your License Key value this way: log in using credentials (URL, account name, and password) that were sent to you after the purchase of our product, press View in the "Activation Key" column against the product dotConnect for SQLite.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Wed 11 Sep 2019 10:40
by bairog
Shalex wrote: Tue 10 Sep 2019 15:494. In Package Manager Console, set Package source to your local source, Default project=DataAccessLayer and run:
PM> install-package devart.data.sqlite.ef6 -pre
Installing that package fails in offline scenario (when PC cannot reach nuget.org, i.e has no internet connection):
Image
Very strange, because I have .NET Core 3 preview 9 SDK installed and all listed assemblies (e. g. System.CodeDom.dll) exist in that folder. So I cannot compile my test project.
Is there a way to use your libraries (and all dependent libraries) directly (e. g. pre-download them via Nuget Package Explorer)?

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Thu 12 Sep 2019 17:09
by Shalex
Please enable the Internet so that the package loaded its dependencies automatically.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Fri 13 Sep 2019 07:26
by bairog
Shalex wrote: Thu 12 Sep 2019 17:09Please enable the Internet so that the package loaded its dependencies automatically.
As I wrote earlier, my PC has no internet connection.
All developer PCs and build servers in our company are connected to local netowrk only, internet connection is prohibited by company rules.
There are separate PCs (which are not not develper PCs and not build servers) with internet connection available.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Sat 14 Sep 2019 18:43
by Shalex
1. The package Devart.Data.SQLite.EF6 with .NET Standard 2.1 (.NET Core 3.0) support is uploaded to nuget.org. We recommend you to upgrade your dotConnect for SQLite to the newest public version 5.13: viewtopic.php?f=29&t=39340.

2. Creating a cache of nuget packages for computers without internet is described here: https://stackoverflow.com/questions/537 ... t-interne/.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Mon 16 Sep 2019 11:39
by bairog
Shalex wrote: Sat 14 Sep 2019 18:432. Creating a cache of nuget packages for computers without internet is described here: https://stackoverflow.com/questions/537 ... t-interne/.
I've used this approach - https://stackoverflow.com/questions/535 ... 6#53572866. Thank you for a guide.
Shalex wrote: Sat 14 Sep 2019 18:43 1. The package Devart.Data.SQLite.EF6 with .NET Standard 2.1 (.NET Core 3.0) support is uploaded to nuget.org. We recommend you to upgrade your dotConnect for SQLite to the newest public version 5.13: viewtopic.php?f=29&t=39340.
I've performed a quick test for EF 6.3 preview 9 running on .NET Core 3.0 preview 9 - everything is working fine for now.
Thank you for a great job.

Re: Entity Framework 6.3 + .NET Core 3 support status

Posted: Wed 12 Feb 2020 17:01
by reredev
Hello,
I tried in a project (console project) to use devart.data.db2 with EFcore 3.1, I had this error during compilation:
Method not found: 'System.String System.AppDomainSetup.get_LicenseFile()'

dbconext code:

class DbContextEx: DbContext
{
public DbSet<Article> Article { get; set; }

/* public DbContextEx(DbContextEx options) : base(options)
{

}*/

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{

optionsBuilder.UseDB2(@"server=xxxx:446;Database=xxxx;UserID=xxxx;Password=xxxx;");
}


}
}

console code :
var lis = _dbContext.Article.FromSqlRaw<Article>("SELECT ....... '").ToListAsync();


EFcore 3.1
devart.data.db2.entity.efcore : C:\Program Files (x86)\Devart\dotConnect\DB2\Entity\EFCore3\Devart.Data.DB2.Entity.EFCore.dll
devart.data.db2 : C:\Program Files (x86)\Devart\dotConnect\DB2\Devart.Data.DB2.dll
devart.data: C:\Program Files (x86)\Devart\dotConnect\DB2\Devart.Data.dll

??????????????????????????????????????????????????????????????????????