TPT to TPH discriminator column issue

95 views Asked by At

I had a class:

public class A { }

Now, I change it to abstract and create two implementations:

public abstract class A { }

public class First : A { }

public class Second : A { }

EF 6 completed the update and created the Discriminator column. But if there was existing data in table, the Discriminator value is not set.

How can I update/set Discriminator value for already existing data with EF 6 Code First?

0

There are 0 answers