I’m looking into the UmbracoMapper https://our.umbraco.com/documentation/Reference/Mapping/ (not to be confused with the UmbracoMapper package by Andy Butland of the same name) and wondered if it does any property automapping by convention? It seems that you have to “DefineMaps” for everything?
The docs say “works in ways very similar to AutoMapper” but I can’t get to automatically map properties between source and target of the same name/type.
The analyzer verifies that every publicly settable property of target
is assigned a value. If a property is not assigned a value, the tool
raises a build error (ie. the code will not compile).
Since, contrary to AutoMapper, mapping is not implicit nor automatic,
this ensures that, should a new property be added to ISource, an error
would be raised until the corresponding mappings are updated.
I probably don't understand the advantage/purpose of a mapper that requires you to be explicit about every property mapping. I could write that code without umbracomapper?
built in UmbracoMapper: ability to "auto map"?
Hello
I’m looking into the UmbracoMapper https://our.umbraco.com/documentation/Reference/Mapping/ (not to be confused with the UmbracoMapper package by Andy Butland of the same name) and wondered if it does any property automapping by convention? It seems that you have to “DefineMaps” for everything?
The docs say “works in ways very similar to AutoMapper” but I can’t get to automatically map properties between source and target of the same name/type.
Does it actually automap?
Thanks Andrew
(using umbraco 8.9)
actually, maybe this explains what im asking: (from further down the page https://our.umbraco.com/documentation/Reference/Mapping/)
I probably don't understand the advantage/purpose of a mapper that requires you to be explicit about every property mapping. I could write that code without umbracomapper?
some insight would be appreciated :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.