DCSIMG
Entity Framework Inheritance Types - Gil Fink's Blog

Gil Fink's Blog

Fink about IT

News

Microsoft MVP

My Facebook Profile My Twitter Profile My Linkedin Profile

Locations of visitors to this page

Creative Commons License

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2013 Gil Fink

Hebrew Articles

Index Pages

My OSS Projects

English Articles

Entity Framework Inheritance Types

Entity Framework Inheritance Types

In Sela SDP Entity Framework Inheritance Types
conference I was
asked if Entity
Framework
supports
inheritance mapping.
The answer I gave
was a small 25 minutes improvised session which I gave after
the EF4 session I had. In the following three posts I’m going to
explain the main three inheritance ways that you can use with EF.
These ways are supported in other ORMs as well.

Why to Use Inheritance?

One of the ORMs main purposes is to enable us the domain developers
to create a conceptual model that resemble our way of thinking about
our domain. Since we use Object Oriented principals like inheritance to
express the domain there is a need to create the inheritances in
the data storages that we use. But how can we create the inheritance
graph in a database and map it within the ORM?

The Main Inheritance Ways

There are three main ways (or combinations of these ways):

As I wrote, I’ll explain every one of these ways and show EF examples
in a follow up series.

DotNetKicks Image

Comments

Gil Fink on .Net said:

Table Per Type Inheritance in Entity Framework The first inheritance mapping I’m going to show is called

# January 22, 2010 11:22 AM