Entity Framework Core Cookbook - Second Edition
eBook - ePub

Entity Framework Core Cookbook - Second Edition

  1. 324 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Entity Framework Core Cookbook - Second Edition

Book details
Book preview
Table of contents
Citations

About This Book

Leverage the full potential of Entity Framework with this collection of powerful and easy-to-follow recipesAbout This Bookā€¢ Learn how to use the new features of Entity Framework Core 1ā€¢ Improve your queries by leveraging some of the advanced featuresā€¢ Avoid common pitfallsā€¢ Make the best of your.NET APIs by integrating with Entity FrameworkWho This Book Is ForThis book is for.NET developers who work with relational databases on a daily basis and understand the basics of Entity Framework, but now want to use it in a more efficient manner. You are expected to have some prior knowledge of Entity Framework.What You Will Learnā€¢ Master the technique of using sequence key generatorsā€¢ Validate groups of entities that are to be saved / updatedā€¢ Improve MVC applications that cover applications developed using ASP.NET MVC Core 1ā€¢ Retrieve database information (table, column names, and so on) for entitiesā€¢ Discover optimistic concurrency control and pessimistic concurrency control.ā€¢ Implement Multilatency on the data side of things.ā€¢ Enhance the performance and/or scalability of Entity Framework Coreā€¢ Explore and overcome the pitfalls of Entity Framework CoreIn DetailEntity Framework is a highly recommended Object Relation Mapping tool used to build complex systems. In order to survive in this growing market, the knowledge of a framework that helps provide easy access to databases, that is, Entity Framework has become a necessity. This book will provide.NET developers with this knowledge and guide them through working efficiently with data using Entity Framework Core. You will start off by learning how to efficiently use Entity Framework in practical situations. You will gain a deep understanding of mapping properties and find out how to handle validation in Entity Framework. The book will then explain how to work with transactions and stored procedures along with improving Entity Framework using query libraries. Moving on, you will learn to improve complex query scenarios and implement transaction and concurrency control. You will then be taught to improve and develop Entity Framework in complex business scenarios. With the concluding chapter on performance and scalability, this book will get you ready to use Entity Framework proficiently.Style and approachFilled with rich code-based examples, this book takes a recipe-based approach that will teach.NET developers to improve their understanding of Entity Framework and help them effortlessly apply this knowledge in everyday situations.

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Entity Framework Core Cookbook - Second Edition by Ricardo Peres in PDF and/or ePUB format, as well as other popular books in Computer Science & Microsoft Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781785880582
Edition
2

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 ...

Table of contents

  1. Entity Framework Core Cookbook - Second Edition