public void InitMappings() { MapBuilder builder = new MapBuilder(); builder.BuildTable <Person>("PersonTable"); builder.BuildColumnsFromSimpleTypes <Person>() .For(p => p.ID) .SetPrimaryKey() .SetReturnValue() .SetAutoIncrement(); builder.BuildRelationships <Person>(); builder.BuildColumns <Pet>() .For(p => p.ID) .SetPrimaryKey() .SetAltName("Pet_ID") .For(p => p.Name) .SetAltName("Pet_Name"); }
public void InitMappings() { MapBuilder builder = new MapBuilder(); builder.BuildTable<Person>("PersonTable"); builder.BuildColumnsFromSimpleTypes<Person>() .For(p => p.ID) .SetPrimaryKey() .SetReturnValue() .SetAutoIncrement(); builder.BuildRelationships<Person>(); builder.BuildColumns<Pet>() .For(p => p.ID) .SetPrimaryKey() .SetAltName("Pet_ID") .For(p => p.Name) .SetAltName("Pet_Name"); }