4
I have the following class scheme with inheritance, as an example:
public class Veiculo
{
public int Id { set; get; }
public string Descricao { set; get; }
}
public class Moto : Veiculo { }
public class Carro : Veiculo { }
That generates the database with the table Veiculo
and the columns Id
, Descricao
and Discriminator
.
I have a record that your field Discriminator
is with the value Moto
. I mean, when I registered this record I did it using a Moto
.
How do I transfer this record of type Moto
for Carro
?
Delete the bike and register as the data as car!!!
– user6026
So your question is very pertinent, excellent question inclusive, but, only if you do a manual editing, or do a routine and leave in the system for change, but, practical thing does not have, only if I’m wrong but, never seen
– user6026
Another factor is that this is a correct inheritance so Moto is different from Car, even the two inheriting by vehicle. So the fields don’t beat, but, sincerity I’ve never seen such doubt I’ll even research
– user6026