I am trying to create a select list ...that basically just creates a user entry for my user to select options to be inserted into the database.
I have this in my controller...which Is not complete Here roles is a list of value and label.....What am I missing here..and how would you then use this to display on view....to I need something in my view model as well?
private IEnumerable<SelectListItem> GetRoles()
IContactEntityEditService contactEntityEditService = DependencyResolver.Current.GetService<IContactEntityEditService>();
List<string> roles = contactEntityEditService.GetContactLinkedEntitiesRoles();
roles.Select(x => new SelectListItem
Value = x.value,
Text = x.label
return new SelectList(roles, "Value", "Text");