Entity Framework Core Cookbook - Second Edition.
Annotation
Call Number: | Libro Electrónico |
---|---|
Main Author: | |
Format: | Electronic eBook |
Language: | Inglés |
Published: |
Birmingham :
Packt Publishing,
2016.
|
Edition: | 2nd ed. |
Subjects: | |
Online Access: | Texto completo |
Table of Contents:
- Cover ; Copyright; Credits; About the Author; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Improving Entity Framework in the Real World; Introduction; Improving Entity Framework by using a code-first approach; Unit testing and mocking; Creating databases from code; Creating mock database connections; Implementing the repository pattern; Implementing the unit of work pattern; Chapter 2: Mapping Entities; Introduction; Mapping non-public members; Mapping interfaces; Shadow properties; Creating one-to-one maps; Creating one-to-many maps.
- Creating many-to-many mapsCreating custom conventions; Using sequence key generators; Using GUIDs as keys; Implementing inheritance
- Table per Class hierarchy; Chapter 3: Validation and Changes; Introduction; Validating simple properties; Validating the whole entity; Validating groups of entities; Intercepting saving changes; Intercepting property changes; Setting the state of an entity; Improving MVC UI with entity framework validation; Inserting, updating, and deleting entities with stored procedures; Updating the database from model changes.
- Dumping the SQL script for the database creationChapter 4: Transactions and Concurrency Control; Introduction; Using explicit transactions; Using transactions in custom SQL operations; Implementing optimistic concurrency in SQL Server; Implementing optimistic concurrency in a database-agnostic way; Chapter 5: Querying; Introduction; Executing client-side functions in LINQ queries; Mixing SQL with LINQ queries; Getting entities from the local cache; Creating filtered collections; Creating reusable queries; Querying shadow properties; Implementing the query object pattern; Using dynamic LINQ.
- Chapter 6: Advanced ScenariosIntroduction; Generating entities from the database; Implementing multitenancy; Strongly typed bulk operations; Handling soft deletes; Adding logging; Capturing the audit data; Retrieving entity metadata; Improving MVC applications; Hooking infrastructure services; Using other databases; Chapter 7: Performance and Scalability; Introduction; Improving the performance of queries; Testing and profiling queries; Using asynchronous operations; Eager loading; Using the cache; Appendix: Pitfalls; Introduction; GroupBy executes on the client side.
- Table per class hierarchy requires nullable columns for derived classesReferences not eagerly fetched are lost; Date/time operations are not supported; Paging in SQL Server earlier than 2012; Database null semantics; Migrations and contexts with parameterized constructors; Migrations with contexts in different projects; Accessing the service provider too soon; Setting the maximum string length; Mapping discriminator columns; Composite primary keys; Refreshing entities; Cascading entity deletes; Index.