I want to create a map of these two models, how to do this at the beginning of the code?
public class Payment { public int PaymentId { get; set; } } public class PaymentBank { public int PaymentId { get; set; } } public class PaymentCheque { public int PaymentId { get; set; } }
Payment can be any type of PaymentBank or PaymentCheque . I am trying to execute a scenario like. I would like if I could inherit this, if possible, for example:
public class PaymentCheque : Payment { public int RoutingNumber {get; set;} }
source share