private static IEnumerable <SelectListItem> createModels(IModelsRepository r) { var list = new List <SelectListItem>(); var models = r.Get().GetAwaiter().GetResult(); foreach (var m in models) { list.Add(new SelectListItem(m.Data.Name, m.Data.Name)); } return(list); }
public async Task <IActionResult> Index() => View(await _modelsRepository.Get(x => x.Status != Status.Passive));