freshsmoe
freshsmoe

Reputation: 179

Scaffold-DbContext does not work with SQLite

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.

Upvotes: 1

Views: 1785

Answers (1)

ErikEJ
ErikEJ

Reputation: 41819

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

Upvotes: 1

Related Questions