售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Entity Framework Core Cookbook - Second Edition
Table of Contents
Entity Framework Core Cookbook - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Improving Entity Framework in the Real World
Introduction
Improving Entity Framework by using a code-first approach
Getting ready
How to do it…
How it works…
There's more…
Convention over configuration
Model-View-Controller
Single Responsibility Principle
Provider Model
Testing
See also
Unit testing and mocking
Getting ready
How to do it…
How it works…
There's more…
One class under test
Integration tests
Arrange, Act, Assert
Mocking
Creating databases from code
Getting ready
How to do it…
How it works…
There's more…
See also
Creating mock database connections
How to do it…
How it works…
See also
Implementing the repository pattern
Getting ready
How to do it…
How it works…
There's more…
Dependency Inversion Principle
Repository and caching
Mocking
Where generic constraint
See also
Implementing the unit of work pattern
Getting ready
How to do it…
How it works…
There's more…
Call per change
Interface Segregation Principle
Refactoring
See also
2. Mapping Entities
Introduction
Mapping non-public members
Getting ready
How to do it…
How it works…
There's more…
See also
Mapping interfaces
Getting ready
How to do it…
How it works…
See also
Shadow properties
Getting ready
How to do it…
How it works…
See also
Creating one-to-one maps
Getting ready
How to do it…
How it works…
There's more…
See also
Creating one-to-many maps
Getting ready
How to do it…
How it works…
There's more…
See also
Creating many-to-many maps
Getting ready
How to do it…
How it works…
There's more…
See also
Creating custom conventions
Getting ready
How to do it…
How it works…
There's more…
See also
Using sequence key generators
Getting ready
How to do it…
How it works...
There's more…
See also
Using GUIDs as keys
Getting ready
How to do it…
How it works…
There's more…
See also
Implementing inheritance – Table per Class hierarchy
Getting ready
How to do it…
How it works…
There's more…
3. Validation and Changes
Introduction
Validating simple properties
Getting ready
How to do it…
How it works…
There's more…
See also
Validating the whole entity
Getting ready
How to do it…
How it works…
See also
Validating groups of entities
How to do it…
How it works…
See also
Intercepting saving changes
Getting ready
How to do it…
How it works…
See also
Intercepting property changes
Getting ready
How to do it…
How it works…
See also
Setting the state of an entity
Getting ready
How to do it…
How it works…
There's more…
See also
Improving MVC UI with entity framework validation
Getting ready
How to do it…
How it works…
There's more…
Understanding the HTML helper
See also
Inserting, updating, and deleting entities with stored procedures
Getting ready
How to do it…
How it works…
There's more…
See also
Updating the database from model changes
Getting ready
How to do it…
How it works…
There's more…
See also
Dumping the SQL script for the database creation
Getting ready
How to do it…
How it works…
There's more…
See also
4. Transactions and Concurrency Control
Introduction
Using explicit transactions
Atomic
Consistent
Isolation
Durability
Getting ready
How to do it…
How it works…
See also
Using transactions in custom SQL operations
Getting ready
How to do it…
How it works…
There's more…
See also
Implementing optimistic concurrency in SQL Server
Getting ready
How to do it…
How it works…
There's more…
Database wins
Client wins/last one wins
See also
Implementing optimistic concurrency in a database-agnostic way
Getting ready
How to do it…
How it works…
There's more…
See also
5. Querying
Introduction
Executing client-side functions in LINQ queries
Getting ready
How to do it…
How it works…
See also
Mixing SQL with LINQ queries
Getting ready
How to do it…
How it works…
There's more…
See also
Getting entities from the local cache
Getting ready
How to do it…
How it works…
There's more…
See also
Creating filtered collections
Getting ready
How to do it…
How it works…
There's more…
See also
Creating reusable queries
Getting ready
How to do it…
How it works…
There's more…
Extension methods
Naming conflict
See also
Querying shadow properties
Getting ready
How to do it…
How it works…
There's more…
See also
Implementing the query object pattern
Getting ready
How to do it…
How it works…
There's more…
See also
Using dynamic LINQ
Getting ready
How to do it…
How it works…
There's more…
6. Advanced Scenarios
Introduction
Generating entities from the database
Getting ready
How to do it…
How it works…
There's more…
Implementing multitenancy
Getting ready
How to do it…
How it works…
There's more…
Strongly typed bulk operations
Getting ready
How to do it…
How it works…
There's more…
Handling soft deletes
Getting ready
How to do it…
How it works…
See also
Adding logging
Getting ready
How to do it…
How it works…
There's more…
Capturing the audit data
Getting ready
How to do it…
How it works…
See also
Retrieving entity metadata
Getting ready
How to do it…
How it works…
There's more…
See also
Improving MVC applications
Getting ready
How to do it.…
See also
Hooking infrastructure services
Using other databases
How to do it…
7. Performance and Scalability
Introduction
Improving the performance of queries
Getting ready
How to do it…
Modifications
Updates
Deletes
Queries
SQL
LINQ
See also
Testing and profiling queries
How to do it…
Logging
Database profiler
Real time monitoring
Testing
See also
Using asynchronous operations
Getting ready
How to do it…
Queries
Modifications
See also
Eager loading
Getting ready
How to do it…
How it works…
See also
Using the cache
Getting ready
How to do it…
How it works…
There's more…
A. Pitfalls
Introduction
GroupBy executes on the client side
Problem
How to fix it…
Table per class hierarchy requires nullable columns for derived classes
Problem
How to solve it…
References not eagerly fetched are lost
Problem
How to solve it…
Date/time operations are not supported
Problem
How to solve it…
Paging in SQL Server earlier than 2012
Problem
How to solve it…
Database null semantics
Problem
How to solve it…
Migrations and contexts with parameterized constructors
Problem
How to solve it…
Migrations with contexts in different projects
Problem
How to solve it…
Accessing the service provider too soon
Problem
How to solve it…
Setting the maximum string length
Problem
How to solve it…
Mapping discriminator columns
Problem
How to solve it…
Composite primary keys
Problem
How to solve it…
Refreshing entities
Problem
How to solve it…
Cascading entity deletes
Problem
How to solve it…
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜