-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Hello!
I have added tests for three inheritance cases for EF6 in pull request #48.
- Added the Parent and Child classes. Only test BulkInsert_OnlyParent_OneRowInserted runs correctly. How do I correctly insert both parent and child? Other tests fail.
- Added test BulkInsertApChild_OneRowInserted with abstract class for TPT checking (Inheritance with EF Code First: Part 2 – Table per Type (TPT)).
- The table name is specified in the Table attribute. Test BulkInsertChild_RenamedParentExists_OneRowInserted throws an exception. An attempt is made to write the value of one column to another in the MapperBase class.
In method MapEntity only properties of the child class are selected:
var propertiesToMap = GetPropertiesToMap(entityMap, storageEntitySet.ElementType.Properties);
foreach (var edmProperty in propertiesToMap)
{
MapProperty(entityMap, edmProperty, ref i, ref prefix);
}
In the MapProperty method the properties of the parent class are also selected:
var entityMembers = TphData[identity].Properties;
And here is the assignment of an incorrect value:
EdmMember edmMember = entityMembers[i];

Is it possible in the MapProperty method to select edmMember not by index, but by key?
Sincerely, Alexander
Metadata
Metadata
Assignees
Labels
No labels
