!notojedopro
New Member
I need help understand why I getting a null object reference here:I have 2 models:\[code\]public class loadViewModel{ public importacaoConfig importacaoConfig { get; set; }}public class importacaoConfig{ public List<DocTypeModel> tipo { get; set; }}\[/code\]Im my controler I am passing a List to the model:\[code\]gedaiapp.Models.loadViewModel model = new gedaiapp.Models.loadViewModel(); model.importacaoConfig.tipo = obj; -> Here obj is of type List<DocTypeModel>\[/code\]This gives me:\[code\]System.NullReferenceException: Object reference not set to an instance of an object.\[/code\]I have checked and the obj list has 3 elements.Which reference is null here? I don