public async Task <IActionResult> Index(int?id) => View(new CheckListViewModel { CheckLists = await repository.GetAsync(), CheckListId = id, Items = id == null ? null : await itemRepository.GetForListAcync(id ?? 0) });
public async Task <ActionResult <IEnumerable <CheckList> > > Get() => Ok(await repository.GetAsync());