I have the following inheritance classes schema, 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 Veiculo
table and the columns Id
, Descricao
and Discriminator
.
I have a record that its Discriminator
field is set to Moto
. That is, when I registered this record I did this using a Moto
reference.
How do I transfer this record from type Moto
to Carro
?