Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Issue: Renaming self-referencing FK column throws "Sequence contains no elements" in EdmModelDiffer [1019]

$
0
0
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;
}
}

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>