finife1670
finife1670

Reputation: 1

TPT to TPH discriminator column issue

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?

Upvotes: 0

Views: 122

Answers (0)

Related Questions