Scaffold-DbContext does not work with SQLite

c# entity-framework entity-framework-core

Question

I am using Entity Framework Core and .NET Core 2.1. I am trying to run the EF designer from the Package Manager Console on Windows, but I get the following error:

System.ArgumentException: The string argument 'storeTypeName' cannot be empty.

This is the command which results in the error above:

Scaffold-DbContext "Filename=switches.db" Microsoft.EntityFrameworkCore.Sqlite -OutputDir Models

I have already tried using the full path to the .db file but I got the same result.

1
1
10/21/2018 5:26:36 PM

Accepted Answer

This is because one of your tables have a column with no defined type. It is fixed in the upcoming version 2.2 (currently available in preview on nuget) https://github.com/aspnet/EntityFrameworkCore/issues/13531

1
10/21/2018 5:55:06 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow