Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Similar as in mapping nodes, yes sure. :-)
Ditto doesn't try do anything else. We weren't really interested in doing Dependency Injection, etc.
uORM looks good.
Thanks! Dit you know uORM existed? And if so, was the DI the reason that you didn't want to use it?
Wow another one ;-). I'm using the ModelsBuilder :-).
Yep, I knew about uORM... as well as the many other libraries that could handle mapping:
There are probably several more that I'd heard of, but can't recall right now.
Originally Ditto was inspired by a post on the 24 Days in Umbraco website: Mapping Umbraco content to POCOs for strongly typed views.
I was looking for a way to simply drop in a library that could convert content/media nodes (e.g. IPublishedContent) to a strongly-typed model... literally a simple POCO - without any class inheritance that would tie to a specific framework or implementation.
Basically I was interested in one thing only, doing this...
var poco = Model.Content.As<MyPoco>();
... and that's all.
I'm not too interested in pushing Ditto as a framework, nor am I saying that it is better than any other approach. I simply wanted to shared my code :-)
@Jeroen - I'm happy that you've found a solution that solves the problem.
PS. I like Zbu.ModelsBuilder - it's very good!
I've not seen them all till now but looking at them i find them or to complicated made (UmbracoMapper) or doesn't get related content / media (Zbu.ModelBinder, or did i miss something?). So i'm still happy with our own uORM :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted