Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Zac 39 posts 61 karma points
    Dec 15, 2012 @ 23:13
    Zac
    0

    Umbraco 2 Linq Generic DataContext

    Is there a generic data context available? I don't need all the specific properties for each of my data types. I just want node name, URL and last update date.

    But I also want to be able to run this from outside the Umbraco Context e.g.

                using (var dataProvider = new NodeDataProvider(@"C:\...\App_Data\umbraco.config", true))
                using (var ctx = new GenericUmbracoDataContext(dataProvider))
                {
                    foreach (var page in ctx.LoadPages())
                    {
                        //page.Url
                        //page.Name
                        /// ...
                    }
                }

    Would this be difficult to create?

Please Sign in or register to post replies

Write your reply to:

Draft