I have a dropdown box which only shows active items in the list. But a user might have selected an item and saved and later that same item might be inactive. When the user edits their selection. The inactive item they have previously selected should be the default item in the list on the edit page along with other active items. I am not sure how to check for that. Here is my code which populates my list.
var meetingTypes = _meetingTypeRepository.FindAll().OrderBy(m => m.Description);
viewModel.MeetingTypes = meetingTypes.Where(a=> a.IsActive ?? false)
.ToSelectList("MeetingTypeId",
"Description",
viewModel.MeetingTypeId.ToString());