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
Hi all,
I'm using Umbraco 5.1 is there anything in the API that lets you automatically map to a specific domain type. For example see below code. This by the way returns empty properties (title, body text, browser title, etc).
Thanks,Dan
public override ActionResult Index(IUmbracoRenderModel model) { HomePage homePage = _hiveManager.QueryContent<HomePage>().GetById(new HiveId("2646fa7b9a0547e0b932a02701277679")); return View(); }
public class HomePage : Umbraco.Cms.Web.Model.Content { public string Title { get; set; } public string BodyText { get; set; } public string BrowserTitle { get; set; } public string MetaKeywords { get; set; } public string MetaDescription { get; set; } }
Not currently but 5.3 scheduled summer will feature "Code First" which can turn POCOs into doctypes (and reverse).
Hey Niels thanks for the reply. Looking forward to future releases!
Dan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
5.1 automatically map to a specific domain type
Hi all,
I'm using Umbraco 5.1 is there anything in the API that lets you automatically map to a specific domain type. For example see below code. This by the way returns empty properties (title, body text, browser title, etc).
Thanks,
Dan
public override ActionResult Index(IUmbracoRenderModel model) { HomePage homePage = _hiveManager.QueryContent<HomePage>().GetById(new HiveId("2646fa7b9a0547e0b932a02701277679")); return View(); }
Not currently but 5.3 scheduled summer will feature "Code First" which can turn POCOs into doctypes (and reverse).
Hey Niels thanks for the reply. Looking forward to future releases!
Dan
is working on a reply...