Class ClassMapper<T>
Maps an entity to a table through a collection of property maps.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: DapperExtensions.Mapper
Assembly: DapperExtensions.StrongName.dll
Syntax
public class ClassMapper<T> : IClassMapper<T>, IClassMapper where T : class
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceClassMapper()
Declaration
public ClassMapper()
Properties
| Improve this Doc View SourceEntityType
Declaration
public Type EntityType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Properties
A collection of properties that will map to columns in the database table.
Declaration
public IList<IPropertyMap> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<IPropertyMap> |
PropertyTypeKeyTypeMapping
Declaration
protected Dictionary<Type, KeyType> PropertyTypeKeyTypeMapping { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Type, KeyType> |
SchemaName
Gets or sets the schema to use when referring to the corresponding table name in the database.
Declaration
public string SchemaName { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
TableName
Gets or sets the table to use in the database.
Declaration
public string TableName { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAutoMap()
Declaration
protected virtual void AutoMap()
AutoMap(Func<Type, PropertyInfo, Boolean>)
Declaration
protected virtual void AutoMap(Func<Type, PropertyInfo, bool> canMap)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Type, System.Reflection.PropertyInfo, System.Boolean> | canMap |
Map(Expression<Func<T, Object>>)
Fluently, maps an entity property to a column
Declaration
protected PropertyMap Map(Expression<Func<T, object>> expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<T, System.Object>> | expression |
Returns
Type | Description |
---|---|
PropertyMap |
Map(PropertyInfo)
Fluently, maps an entity property to a column
Declaration
protected PropertyMap Map(PropertyInfo propertyInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | propertyInfo |
Returns
Type | Description |
---|---|
PropertyMap |
Schema(String)
Declaration
public virtual void Schema(string schemaName)
Parameters
Type | Name | Description |
---|---|---|
System.String | schemaName |
Table(String)
Declaration
public virtual void Table(string tableName)
Parameters
Type | Name | Description |
---|---|---|
System.String | tableName |