Esempio n. 1
0
 private static EntityType FindTableForTemporaryExtraPropertyMapping(
     DbDatabaseMapping databaseMapping,
     EntityType entityType,
     EntityType fromTable,
     EntityType toTable,
     ColumnMappingBuilder pm)
 {
     return(fromTable != toTable ? (entityType.BaseType != null ? EntityMappingConfiguration.FindBaseTableForExtraPropertyMapping(databaseMapping, entityType, pm) ?? fromTable : fromTable) : databaseMapping.Database.AddTable(entityType.Name, fromTable));
 }
Esempio n. 2
0
        private static EntityType FindTableForExtraPropertyMapping(
            DbDatabaseMapping databaseMapping,
            EntityType entityType,
            EntityType fromTable,
            EntityType toTable,
            ref EntityType unmappedTable,
            ColumnMappingBuilder pm)
        {
            EntityType entityType1 = EntityMappingConfiguration.FindBaseTableForExtraPropertyMapping(databaseMapping, entityType, pm);

            if (entityType1 == null)
            {
                if (fromTable != toTable && entityType.BaseType == null)
                {
                    return(fromTable);
                }
                if (unmappedTable == null)
                {
                    unmappedTable = databaseMapping.Database.AddTable(fromTable.Name, fromTable);
                }
                entityType1 = unmappedTable;
            }
            return(entityType1);
        }