I have found this issue when i was trying to call InsertAll function.
The error thrown was "Sequence contains no element" at row 192 of MappingHelper, when withCondition doesn't have elements
tableMapping.TPHConfiguration = new TPHConfiguration { ColumnName = withConditions.First().Fragments[0].Conditions[0].Column.Name, Mappings = new Dictionary<Type, string>() };
IMHO this error occurs when the model has a related inheritance, but the inheritance type is not of TPH pattern, but for example a TPT inheritance.
I have written my context in code-first mode and, for some needs, i have to implement this inheritance.
I have downloaded the source code and, at the moment, I have modified the code so as I will use the library anyway (i have only checked if withConditions has elements), but if anyone who knows better EF model mapping has a solution for this problem, this is appreciated.
Hi,
I have found this issue when i was trying to call InsertAll function. The error thrown was "Sequence contains no element" at row 192 of MappingHelper, when withCondition doesn't have elements
tableMapping.TPHConfiguration = new TPHConfiguration { ColumnName = withConditions.First().Fragments[0].Conditions[0].Column.Name, Mappings = new Dictionary<Type, string>() };
IMHO this error occurs when the model has a related inheritance, but the inheritance type is not of TPH pattern, but for example a TPT inheritance. I have written my context in code-first mode and, for some needs, i have to implement this inheritance. I have downloaded the source code and, at the moment, I have modified the code so as I will use the library anyway (i have only checked if withConditions has elements), but if anyone who knows better EF model mapping has a solution for this problem, this is appreciated.
Thanks is advance