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. Which base class do you use to configure a class used to contain a number of properties that are common to multiple entities?

  1. EntityTypeConfiguration

  2. ComplexTypeConfiguration

  3. CommonTypeConfiguration

Q2. You must have table names and class names that always match in Entity Framework, true or false?

Q3. Every property in an entity is always persisted to the database, true or false?

Q4. What is the name of the technique that involves selecting a subset of columns from a table via a query in Entity Framework?

  1. Projection

  2. Subquery

  3. You cannot do this in Entity Framework

Q5. You must declare a result type to dynamically select columns from multiple tables via a single query, true or false?

Q6. You must use the Join keyword to select data from related tables in a single query, true or false?

Q7. Which function can be used in a method syntax query to repeat parent data along with unique child data in a single query result?

  1. Select

  2. GroupJoin

  3. SelectMany

Q8. Which LINQ method can be...