简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM