public bool ChangeWorkListItemCompletionStatus(WorkCheckListItem item) { item.IsCompleted = !item.IsCompleted; _context.Entry(item).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(item.IsCompleted); }
public void CompleteCheckList(CheckList checklist) { checklist.CreationCompleted = true; _context.Entry(checklist).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChangesAsync(); }