Supposing the following entities :
public class Kisi
{
[Key]
public int KisiID { get; set; }
public string Ad { get; set; }
public string Soyad { get; set; }
public virtual ICollection<Grup> Gruplar { get; set; }
public virtual ICollection<Kampanya> Kampanyalar { get; set; }
}
public class Musteri : Kisi
{
public int? Yas { get; set; }
public string Meslek { get; set; }
}
These two classes storing one table(TPH) in SQL SERVER.
I saved a Kisi and this could be in relation to other tables. How can I cast/convert/"promote" it to a Musteri, keeping the same ID ? I can't recreate.
I could issue a "manual" SQL INSERT, but it's kind of ugly...
How can i handle it without loosing the KisiID ?