public void AddCheckList(string checkListDescription, int checkListPoints, int GroupId) { GroupCheckList checkListItem = new GroupCheckList(); checkListItem.GroupId = GroupId; checkListItem.Name = checkListDescription; checkListItem.Points = checkListPoints; _dbContext.GroupCheckLists.Add(checkListItem); }
public void UpdateCheckList(int checkListId, string checkListDescription, int checkListPoints, int GroupId) { GroupCheckList checkListItem = _dbContext.GroupCheckLists.FirstOrDefault(x => x.Id == checkListId); if (checkListItem != null) { checkListItem.GroupId = GroupId; checkListItem.Name = checkListDescription; checkListItem.Points = checkListPoints; } }