private static ObjectMapper CreateMapper(DataTable table, Action<TypeMapBuilder<Foobar>> configure)
 {
     var typeMapBuilder = new TypeMapBuilder<Foobar>();
     configure(typeMapBuilder);
     var typeMap = typeMapBuilder.GetTypeMap();
     var dataColumnInfos = table.Columns.Cast<DataColumn>().Select(x => new DataColumnInfo { Index = x.Ordinal, Name = x.ColumnName });
     var mapper = new ObjectMapper(new DefaultInstanceFactory());
     mapper.Initialize(typeMap, dataColumnInfos);
     return mapper;
 }