This question is locked. New answers and comments are not allowed.
Hello community,
I'm using in my project a model Fluent generated by the wizard, using the migration process, my script is generated normally but my foreign keys are not generated. I check all propertys in model.
The following code:
I'm using in my project a model Fluent generated by the wizard, using the migration process, my script is generated normally but my foreign keys are not generated. I check all propertys in model.
The following code:
public string AdaptarBancoDados()
{
string script = null;
using (EntitiesModel dbContext = new EntitiesModel())
{
Telerik.OpenAccess.ISchemaHandler schemaHandler = dbContext.GetSchemaHandler();
if (schemaHandler.DatabaseExists())
{
script = schemaHandler.CreateUpdateDDLScript(null);
}
else
{
schemaHandler.CreateDatabase();
script = schemaHandler.CreateDDLScript();
}
}
return script;
}