efcore icon indicating copy to clipboard operation
efcore copied to clipboard

EF Core Sqlite

Open 0x3ch0 opened this issue 6 years ago • 4 comments

I just want to say that this issue is still happening in the latest version

https://stackoverflow.com/questions/59186616/ef-core-update-database-throws-system-nullreferenceexception

Hoping for the future fix.

0x3ch0 avatar Jan 28 '20 02:01 0x3ch0

@xshiiiidev Please attach a small, runnable project or post a complete code listing that demonstrates the behavior you are seeing so that we can investigate.

ajcvickers avatar Jan 28 '20 17:01 ajcvickers

I just created a new fresh project and installed the nugget package Microsoft.Data.Sqlite.Core.

Now after installing it, the error is shown when issuing the command Update-Database. Because this package does not include its dependency Microsoft.Data.Sqlite by default.

I think the installation should just include the Microsoft.Data.Sqlite by default.

0x3ch0 avatar Jan 30 '20 07:01 0x3ch0

@xshiiiidev Use Microsoft.Data.Sqlite if you want a package pre-configured with a native SQLite executable. Microsoft.Data.Sqlite.Core is for manual configuration. The "Core" here has nothing to do with .NET Core or EF Core.

ajcvickers avatar Jan 30 '20 16:01 ajcvickers

Oh I see the SQLite Core has nothing to do with the .Net Core and EF Core. My wrong.

I will close this now.

0x3ch0 avatar Jan 31 '20 01:01 0x3ch0