In Asp.net core When i use base class for view model and when i use that in post method ,Model binder is unable to populate base class properties in model.
public class AppDTO
{
public string Name{get;set;}
public string Email {get;set;}
}
public class AppViewModel:AppDTO
{
public string Address {get;set;}
}
And in Action method
public JsonResult PostApp(AppViewModel model)
{
// here when i try to access model values only address property is populated and name and email are null.
}
}
Any Recommentations ?