Ejemplo n.º 1
0
 public static ColumnMapBuilder <T> RegisterModel <T>(this FluentMappings.MappingsFluentEntity <T> mapBuilder, string tableName = null) where T : ModelBase, new()
 {
     return(mapBuilder.Table.MapTable(tableName)
            .Columns
            .AutoMapPropertiesWhere(IsMappableProperty)
            .PrefixAltNames(String.Format("{0}_", typeof(T).Name))
            .For(c => c.Id)
            .SetPrimaryKey()
            .SetReturnValue()
            .SetAutoIncrement());
 }
Ejemplo n.º 2
0
 public static ColumnMapBuilder <T> MapResultSet <T>(this FluentMappings.MappingsFluentEntity <T> mapBuilder) where T : ResultSet, new()
 {
     return(mapBuilder
            .Columns
            .AutoMapPropertiesWhere(IsMappableProperty));
 }
Ejemplo n.º 3
0
 public static ColumnMapBuilder <T> RegisterDefinition <T>(this FluentMappings.MappingsFluentEntity <T> mapBuilder, string tableName = null) where T : ProviderDefinition, new()
 {
     return(RegisterModel(mapBuilder, tableName).Ignore(c => c.ImplementationName));
 }