Bind DropDownListFor with List on ViewModel
问题 I'm trying to do this: This is my ViewModel and Model: public class OpeningYearViewModel { public int OpeningYearId { get; set; } public string Description { get; set; } public List<Grade> GradesList { get; set; } } public class Grade { public int GradeId { get; set; } public string Name { get; set; } public int CurrencyId { get; set; } public int Cost { get; set; } } This is my Controller. I build a SelecList here and pass it to the view through the ViewBag OpeningYearViewModel viewmodel =