Using Nightly 6.0.0-alpha3-20404
Repro steps:
Create new console application with inheritance, EdmProperty Model based conventions, and Initializer
comment out ModelBuilder.Conventions.Add line
Run application (populate database)
uncomment ModelBuilder.Conventions.Add line
Run application
"Sequence contains no elements" Exception is thrown
Attached Program.cs contains the model and application logic
model has two classes, one inheriting from the other with a one to many foreign key relationship between the two.
convention:
class ModelBasedConvention : IDbConvention<EdmProperty>
{
public void Apply(EdmProperty property, EdmModel model)
{
property.Name = "_" + property.Name;
}
}
Repro steps:
Create new console application with inheritance, EdmProperty Model based conventions, and Initializer
comment out ModelBuilder.Conventions.Add line
Run application (populate database)
uncomment ModelBuilder.Conventions.Add line
Run application
"Sequence contains no elements" Exception is thrown
Attached Program.cs contains the model and application logic
model has two classes, one inheriting from the other with a one to many foreign key relationship between the two.
convention:
class ModelBasedConvention : IDbConvention<EdmProperty>
{
public void Apply(EdmProperty property, EdmModel model)
{
property.Name = "_" + property.Name;
}
}