Wrox Programmer Forums
|
BOOK: Professional ASP.NET Design Patterns
This is the forum to discuss the Wrox book Professional ASP.NET Design Patterns by Scott Millett; ISBN: 978-0-470-29278-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET Design Patterns 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 June 23rd, 2012, 03:46 AM
Registered User
 
Join Date: Jun 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7: DataContext

Hi All,

2 Questions with regard to the EF repository pattern presented in this book which I am in the process of implementing.

1) In the LibraryDataContext it stores (caches?) ObjectSet's of Books, BookTitles & Members. These seem to only be accessed in the relevant query translator. Why is it done this way as opposed to using FindAll()? I am guessing that creating the object set doesn't query the database, so what is the gain of doing it this way?

2) The repository used in EF has a FindAll() method which in turn calls an abstract GetObjectSet() implemented by the specific repository, but all implementations of GetObjectSet() in the example are the same - so what is the advantage of making it abstract instead of implementing it in the Repository base class?

Cheers,

Dale





Similar Threads
Thread Thread Starter Forum Replies Last Post
DataContext Lifetime : Structure Map + EF fillie76 BOOK: Professional ASP.NET Design Patterns 0 January 6th, 2012 02:20 PM
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Dynamic DataContext? softwarea BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 8 June 1st, 2009 01:04 PM
Creating a DataContext Schildb BOOK: Professional ADO.NET 3.5 with LINQ and the Entity Framework ISBN: 978-0-470-22988-0 1 April 14th, 2009 02:11 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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