C# Class LX.EasyDb.Mapping

Provides classes and method for ORM.
Inheritance: SqlMapper.ITypeMapRegistry
Datei anzeigen Open project: longshine/EasyDb.NET

Public Methods

Method Description
FindTable ( String entity ) : Table

Finds a table mapped with the specified entity.

FindTable ( Type type ) : Table

Finds a table mapped with the specified type.

Phantom ( Type realType, Type phantomType ) : void

Registers mapping of a real type with metadata defined in another phantom type. This could be useful when the model is public, however the mapping details need to be unknown to others.

SetTable ( String entity, Table table ) : void

Sets a table mapped with the specified entity.

SetTable ( Type type, Table table ) : void

Sets a table mapped with the specified type.

Private Methods

Method Description
GetTypeName ( Type type ) : String
SqlMapper ( Type type ) : SqlMapper.ITypeMap
SqlMapper ( Type type, Dapper.SqlMapper map ) : void

Method Details

FindTable() public method

Finds a table mapped with the specified entity.
public FindTable ( String entity ) : Table
entity String the name of the entity to map
return Table

FindTable() public method

Finds a table mapped with the specified type.
public FindTable ( Type type ) : Table
type System.Type the to map
return Table

Phantom() public method

Registers mapping of a real type with metadata defined in another phantom type. This could be useful when the model is public, however the mapping details need to be unknown to others.
public Phantom ( Type realType, Type phantomType ) : void
realType System.Type the real type to map
phantomType System.Type the type which contains mapping definition
return void

SetTable() public method

Sets a table mapped with the specified entity.
public SetTable ( String entity, Table table ) : void
entity String the entity to map
table Table the mapping rules impementation, or null to remove custom map
return void

SetTable() public method

Sets a table mapped with the specified type.
public SetTable ( Type type, Table table ) : void
type System.Type the to map
table Table the mapping rules impementation, or null to remove custom map
return void