C# Class EntityFramework.Metadata.Mappers.MapperBase

Mostra file Open project: schneidenbach/EntityFramework.Metadata

Protected Properties

Property Type Description
MetadataWorkspace MetadataWorkspace
_entityMaps EntityMap>.Dictionary

Public Methods

Method Description
BindForeignKeys ( ) : void

MapEntity ( string typeFullName, System.Data.Entity.Core.Metadata.Edm.EdmType edmItem ) : EntityMap

Protected Methods

Method Description
GetTphData ( ) : TphData>.Dictionary
GetTypeMappingsEf6 ( ) : EntityType>.Dictionary

Type name and Edm.EntityType map for EF6+ Key is type full name (Also OSpace item fullname and OCSpace identity) Value is EntityType from CSpace

MapperBase ( MetadataWorkspace metadataWorkspace, System.Data.Entity.Core.Metadata.Edm.EntityContainer entityContainer ) : System

PrepareMapping ( string typeFullName, System.Data.Entity.Core.Metadata.Edm.EdmType edmitem ) : PrepareMappingRes

Private Methods

Method Description
ActuallyAddAProperty ( EntityMap entityMap, System.Data.Entity.Core.Metadata.Edm.EdmProperty edmProperty, string propName, string columnName, System.Data.Entity.Core.Metadata.Edm.EdmMember edmMember ) : void
GetPropertiesToMap ( EntityMap entityMap, IEnumerable properties ) : IEnumerable

Gets properties that are ment for given type. TPH columns are ordered by hierarchy and type name. First columns are from base class. Derived types, which name starts with 'A', columns are before type, which name starts with 'B' etc. So the logic is to include all properties inherited from base types and exclude all already bound properties from siblings.

RegEntity ( string typeFullName, string tableName, string schema ) : EntityMap

TryGetRefObjectType ( string typeFullName ) : Type

Method Details

BindForeignKeys() public method

public BindForeignKeys ( ) : void
return void

GetTphData() protected method

protected GetTphData ( ) : TphData>.Dictionary
return TphData>.Dictionary

GetTypeMappingsEf6() protected method

Type name and Edm.EntityType map for EF6+ Key is type full name (Also OSpace item fullname and OCSpace identity) Value is EntityType from CSpace
protected GetTypeMappingsEf6 ( ) : EntityType>.Dictionary
return EntityType>.Dictionary

MapEntity() public method

public MapEntity ( string typeFullName, System.Data.Entity.Core.Metadata.Edm.EdmType edmItem ) : EntityMap
typeFullName string
edmItem System.Data.Entity.Core.Metadata.Edm.EdmType
return EntityMap

MapperBase() protected method

protected MapperBase ( MetadataWorkspace metadataWorkspace, System.Data.Entity.Core.Metadata.Edm.EntityContainer entityContainer ) : System
metadataWorkspace MetadataWorkspace
entityContainer System.Data.Entity.Core.Metadata.Edm.EntityContainer Code first or DB first entityContainer
return System

PrepareMapping() protected abstract method

protected abstract PrepareMapping ( string typeFullName, System.Data.Entity.Core.Metadata.Edm.EdmType edmitem ) : PrepareMappingRes
typeFullName string
edmitem System.Data.Entity.Core.Metadata.Edm.EdmType
return PrepareMappingRes

Property Details

MetadataWorkspace protected_oe property

The magic box
protected MetadataWorkspace MetadataWorkspace
return MetadataWorkspace

_entityMaps protected_oe property

Table mappings dictionary where key is entity type full name.
protected Dictionary _entityMaps
return EntityMap>.Dictionary