I have defined a new ViewModel class as follow:-
public class myviewmodel
{
public IEnumerable<Question> Questions { get; set; }
public decimal Total { get; set; }
public string Message { get; set; }
}
but I can also defined it as
public class myviewmodel
{
public List<Question> Questions { get; set; }
public decimal Total { get; set; }
public string Message { get; set; }
}
and this can also happen if I want to create a new model class; So what are the differences between the two appraches? BR