Open LearnGrowAndShare opened 6 years ago
As you noted, actually relationships are not enforced with contraints on the database. The problem is that EF migration pipeline is written for databases that supports ALTER TABLE ADD CONSTRAINT and is quite tricky to bypass this requirement.
Any suggestion on how to build this solution/ repo as I am getting quite some error related to nuget pacakge.
Hi,
I am having some trouble with the migration to sql lite which has schema defined : Below is my Models
I have below Model"
Db Context
Migration configuration: internal sealed class Configuration : DbMigrationsConfiguration
{
public Configuration()
{
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = true;
SetSqlGenerator("System.Data.SQLite", new SQLiteMigrationSqlGenerator());
}
I also tried putting ForeignKey attribute, but no luck
Everything comes properly in Database except the foreign key. The relationship is not defined in the sqllite DB.
And for me when I clone this project I was not able to build, was getting some nuget issues, so could not debug or run the example project.
Does below line means its is not supprted: Relationships are not enforced with constraints
Connection string: