Thursday, February 26, 2015

Data inserted and System.NullReferenceException error message on ViewModel class

Hi Fabio,


Per my understanding, this issue may be caused by the Acesso property in Funcionario class. I found that you’ve not initialized that property. Try use the following code, test it and let me know the result.



public class Funcionario

{

public string Id { get; set; }

public int RE { get; set; }

public string Nome { get; set; }


public virtual Acesso Acesso { get; set; }


public Funcionario()

{

Acesso = new Acesso();

}

}

Regards,




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.


No comments:

Post a Comment