Code-First Development with Entity Framework

Purchase a Subscription!

Watch the first few minutes on us! If you'd like to watch the entire video and hundreds more like it, download code samples, access offline videos and skills assessments, and use the discussion forums, log in or purchase a subscription.


Instructor

Tony Sneed

Description

The default approach to developing Entity Framework applications has been to add an Entity Data Model to your Visual Studio project. However, the “Model First” approach, as it is known, has a dark side: the model file has to be stored on disk and manually maintained. Entity Framework offers another approach, called “Code First,” which infers the model based on a set of conventions and alleviates the need for a physical model. With Code First, you simply create classes with properties that map to database tables and columns. You can configure EF to create the database for you, or you can map classes to an existing database using either attributes or a code-based fluent API. There are also tools which allow you to reverse engineer entity classes and mappings from an existing database. This session provides a set of best practices for selecting mapping and configuration strategies that are best suited for your needs and can be used in real-world scenarios.

Table of Contents

{{toc.Position}} {{toc.Text}}

Related Links

  • {{link.LinkText}} (requires a paid subscription)

Series

This course is part of the following series: