示例#1
0
 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)
 });
示例#2
0
 public async Task <ActionResult <IEnumerable <CheckListItem> > > GetForList(int listId)
 => Ok(await repository.GetForListAcync(listId));