This is the second part in the Exam 70-487 preparation materials series. This post will cover all objectives regarding Entity Framework. If you want to see all of this in action, check out the Github repository.
Objectives
- Query and manipulate data by using the Entity Framework
- Query, update and delete data by using DbContext; build a query that uses deferred execution; implement lazy loading and eager loading; create and run compiled queries; query data by using Entity SQL; perform asynchronous operations using Entity Framework; map a stored procedure
- Query and manipulate data by using Data Provider for Entity Framework
- Query and manipulate data by using Connection, DataReader and Command from the System.Data.EntityClient namespace; perform synchronous and asynchronous operations; manage transactions (API); programmatically configure a Data Provider
- Query data by using LINQ to Entities
- Query data by using LINQ operators (for example, project, skip, aggregate, filter and join); log queries and database commands; implement query boundaries (IQueryable vs. IEnumerable); implement async query
- Query and manipulate data by using ADO.NET
- Query and manipulate data by using Connection, DataReader, Command, DataAdapter, DataSet; perform synchronous and asynchronous operations; manage transactions (API)
- Create an Entity Framework data model
- Structure the data model using table per type, table per class, table per hierarchy; choose and implement an approach to manage a data model (code first vs. model first vs. database first); implement POCO objects; describe a data model by using conceptual schema definitions, storage schema definition, mapping language (CSDL, SSDL, MSL) and Custom Code First Conventions
Useful Links
Query & Manipulate data using Entity Framework
- ObjectContext vs DbContext
- Add vs Attach
- When to use Add and Attach
- CRUD
- Lazy Loading
- Explicit Loading
- Eager Loading
- Querying
Query & Manipulate data using Data Provider for Entity Framework
- Connection Management
- Building EntityConnection Connection String
- Execute parameterized Entity SQL Query using EntityCommandExecute parameterized Entity SQL Query using EntityCommand
- Working with transactions
Query data by using LINQ to Entities
Query and manipulate data by using ADO.NET
- ADO.NET overview
- ADO.NET Architecture
- Data Providers
- DbConnection
- DbCommand
- DbDataReader
- DbDataAdapter
- Retrieving and modifying data in ADO.NET
- Executing a command
- DataAdapters and DataReaders
- Retrieving data using a DataReader
- Populating a DataSet from a DataAdapter
Create an Entity Framework data model
- Inheritance Strategies
- Table per Hierarchy
- Table per Type
- Table per Concrete Class
- Complex Types
- Code virst vs model first vs database first
- Define POCO entities
- Conditional Mapping
- Working with POCO entities
- CSDL, SSDL and MSL Specifications
-
Exploring how the Entity Data Model (EDM) Generates Code and Executes QueriesExploring how the Entity Data Model (EDM) Generates Code and Executes Queries
- Model first
- Entity Data Model
- Function Import
- Create DbContext in Entity Framework
- Entity SQL
- Entity SQL Value Keyword
- Connection Retry & Transient fault handling