Quantcast
Channel: Foreign Keys – One Unicorn
Browsing latest articles
Browse All 11 View Live

What’s the deal with mapping foreign keys using the Entity Framework?

Since EF4 it has been possible to map foreign key columns to properties of entity classes. But is it really a good idea to do this? In this post I’ll explain the reasons for keeping foreign keys out of...

View Article



Secrets of DetectChanges Part 1: What does DetectChanges do?

Entity Framework change tracking is often something that doesn’t require too much thought from the app developer. However, change tracking and the DetectChanges method are a part of the stack where...

View Article

Secrets of DetectChanges Part 2: When is DetectChanges called automatically?

Part 1 of this series on DetectChanges described why DetectChanges is needed to discover the changes that have been made to POCO entities. This part will expand on that information and look at when it...

View Article

Secrets of DetectChanges Part 3: Switching off automatic DetectChanges

In parts 1 and 2 of this series we looked at what DetectChanges does and why the context calls DetectChanges automatically. In this part we’ll look at how automatic calls to DetectChanges can be...

View Article

Deleting orphans with Entity Framework

It is common for a single parent entity to be related to many child entities. This relationship may be required or optional. A  required relationship means that the child cannot exist without a parent,...

View Article


Many-to-many relationships in EF Core 2.0 – Part 4: A more general abstraction

In the last few posts we saw how to hide use of the join entity from two entities with a many-to-many relationship. This post doesn’t add any additional functionality, it just abstracts some of what we...

View Article
Browsing latest articles
Browse All 11 View Live




Latest Images