I have this LoanWithClient
Model that inherits from Loan
:
public class LoanWithClient : Loan
{
public Client Client { get; set; }
}
How can I access the entire inherited Loan
object without having to explicitly write its properties?
LoanWithClient does not contain a definition for Loan
return new LoanWithClient
{
**Loan** = loan, //The Loan is erroring: LoanWithClient does not contain a definition for Loan
Client = client
};
Class Loan:
public class Loan
{
public int ID { get; set; }
public string Address { get; set; }
public string City { get; set; }
//etc..
}