Book Image

Code-First Development with Entity Framework

By : Sergey Barskiy
Book Image

Code-First Development with Entity Framework

By: Sergey Barskiy

Overview of this book

<p>Entity Framework Code-First enables developers to read and write data in a relational database system using C# or VB.NET. It is Microsoft's answer to demand for an ORM from .NET developers.</p> <p>This book will help you acquire the necessary skills to program your applications using Entity Framework. You will start with database configuration and learn how to write classes that define the database structure. You will see how LINQ can be used with Entity Framework to give you access to stored data. You will then learn how to use Entity Framework to persist information in a Relational Database Management System. You will also see how you can benefit from writing ORM-based .NET code. Finally, you will learn how Entity Framework can help you to solve database deployment problems using migrations.</p>
Table of Contents (15 chapters)
Code-First Development with Entity Framework
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Self-test questions


Q1. You have to enable migrations on a project to take advantage of schema updates built into Entity Framework, true or false?

Q2. Automatic migrations work 100 percent of the time; there is no reason to ever create explicit migrations, true or false?

Q3. You do not need access to the target database in order to generate the migrations script to the latest version, true or false?

Q4. In order to add migrations to an existing production database, you need to do which of the following?

  1. Just enable automatic migrations

  2. Create an initial migration, scripting the entire database

  3. Create an initial empty migration

Q5. You cannot use Visual Studio in order to update a local development environment, true or false?

Q6. Entity Framework migrations have no support for stored procedures, so you must use other tools to achieve this task, true or false?

Q7. In order to set a common precision and scale for all decimal fields across all the entity classes and tables, you have to specify this size...