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