I'm trying to make an initial migration of SQLite database with Entity Framework Core.
My solution consists of two projects: Console Application and Class Library (that contains DbContext and all models).
DbContext looks like that:
public class SQLite_DbContext : DbContext
{
public DbSet<DeviceRepresentation> Devices { get; set; }
public DbSet<FileInfoDatabaseRepresentation> Files { get; set; }
public SQLite_DbContext(DbContextOptions<SQLite_DbContext> options)
: base(options)
{
}
}
Being in class library (where I keep my DbContext), I'm trying to create migration:
dotnet ef migrations add InitialCreate
As a result, dotnet cli returns an error:
Unable to create an object of type 'SQLite_DbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Can you see what could be a problem here?