I need to order an Ienumerable select list with respect to the values in an array
my code is shown below:
model.RequestedSegments = EvaluationServices.GetSegmentlistItems.Where(a => model.RequestedSelectedSegments.Contains(a.Value));
where RequestedSegments and RequestedSelectedSegments are members of a model
declared as:
public IEnumerable<SelectListItem> RequestedSegments { get; set; }
public string[] RequestedSelectedSegments { get; set; }
Thanks,
suraj
I tried the following code and it works ok: