public static IEnumerable<SelectListItem> FillddlEthenicGroup() { var service = new EthenicService(); var ethenics = service.GetAll(); var listitems = ethenics.Select(x => new SelectListItem { Text = x.EthenicGroup, Value = x.Id.ToString() }); return listitems; }
public static IEnumerable <SelectListItem> FillddlEthenicGroup() { var service = new EthenicService(); var ethenics = service.GetAll(); var listitems = ethenics.Select(x => new SelectListItem { Text = x.EthenicGroup, Value = x.Id.ToString() }); return(listitems); }
// GET: Ethenics public ActionResult Index() { var ethenics = Service.GetAll(); return(View(ethenics)); }