原文发布时间为:2011-09-23 —— 来源于本人的百度文章 [由搬家工具导入]
4.EF团队博客
http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-1-introduction-and-model.aspx
Series ContentsPart 1: Introduction and ModelIntroduces the topics that will be covered in the series Presents a Code First model that will be used in the subsequent parts Part 2: Connections and ModelsCovers using DbContext constructors to configure the database connection and set the context to work in Code First, Model First, or Database First mode Shows different ways that the DbSet properties on the context can be defined Part 3: Finding EntitiesShows how an entity can be retrieved using its primary key value. Part 4: Add/Attach and Entity StatesShows different ways to add a new entity to the context or attach an existing entity to the context Covers the different entity states and shows how to change the state of an entity Part 5: Working with Property ValuesShows how to get and set the current and original values of individual properties Covers different ways of working with all the property values of an entity Shows how to get and set the modified state of a property Part 6: Loading Related EntitiesCovers the loading related entities eagerly, lazily, and explicitly Part 7: Local DataShows how to work locally with entities that are already being tracked by the context Provides some general information on the facilities provided by DbContext for data binding Part 8: Working with ProxiesPresents some useful tips for working with dynamically generated entity proxies Part 9: Optimistic Concurrency PatternsShows some common patterns for handling optimistic concurrency exceptions Part 10: Raw SQL QueriesShows how to send raw queries and commands to the database Part 11: Load and AsNoTrackingCovers the Load and AsNoTracking LINQ extension methods for loading entities into the context and querying entities with having them be tracked by the context Part 12: Automatically Detecting ChangesDescribes when and how DbContext automatically detects changes in entities provides some pointers for when to switch this off