Wrox Programmer Forums
BOOK: Professional Sitecore Development
This is the forum to discuss the Wrox book Professional Sitecore Development John West; ISBN: 978-0-470-93901-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Sitecore Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 3rd, 2014, 12:40 PM
Registered User
Join Date: Jan 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Entity Framework

Has anyone considered the using Entity Framework for Sitecore Content Tree access?

Problem: Access the content tree without having to use "magic strings" or a "constants file" and via data container (entity) objects that are based on our custom templates from the Sitecore Content Tree.

Possible Solution: Use the .Net Entity Framework to spin up (generate) strongly typed objects based on our templates.

Benefits: This would allow the use of...
1. Linq to CRUD the content tree
1.1 Allowing simple access to developer who know Linq, as long as a experience Sitecore dude setup the .edmx and T4 and Content Tree
2. Allow vast control over the generated classed via the EF designer and T4
3. Allow very simple strongly typed Content Tree access
4. Allow problems to be caught by the compiler and not by running and testing the code
4.1 Without a server class dev box (which all of us should have but...) it takes a long time to debug changes to Sitecore code. If the compiler can catch problems this is a huge win!

I've been trying to become the worlds most productive Sitecore Dude (it's good to have a goal). I have been researching the Entity Framework, T4, Linq and all that jazz. I have the idea that between Linq to Entities and Web Controls even the problem of Web User Controls being full of strings that aren't tested at compile time can be overcome.

Please note that something similar to this was tried with ClassySC but it wasn't complete enough to provide the required benefits (useful but not complete).

Please note that magic strings are still used but they are in a common abstraction (the edmx file) that the developer does not have to care about.

Has anyone ever done this? Does anyone have a working .edmx file and code example that allows this?


Similar Threads
Thread Thread Starter Forum Replies Last Post
using entity framework 5 misuk11 BOOK: Professional ASP.NET Design Patterns 1 February 25th, 2014 05:23 PM
Entity Framework vbboyd BOOK: Beginning ASP.NET 4.5 : in C# and VB 5 January 18th, 2013 11:48 AM
Entity Framework And MVC geomar BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 5 January 24th, 2011 04:58 PM
The BeerHouse and Entity Framework docluv BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 3rd, 2008 01:32 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.