Sometimes when we use mapping by code we want to see the generated HBM, just to understand if all is working as expected. I did this in some my old posts by dumping the hbm with an helper method, but I simply miss that the function exists as an extension method. Here below an example:
var compiled = mapper.CompileMappingForAllExplicitlyAddedEntities();
We simply need to include the following using:
Here I use the AsString
method that serialize in a string the compiled mapping.