Пример #1
0
        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);
        }
Пример #2
0
 public async Task <IActionResult> Index() => View(await _modelsRepository.Get(x => x.Status != Status.Passive));