public virtual async Task DeleteGroup(ToDoGroupDto group, CancellationToken cancellationToken) { await ODataClient .For <ToDoGroupDto>("ToDoGroups") .Key(group.Id) .DeleteEntryAsync(cancellationToken); ToDoGroups.Remove(group); }
public virtual async Task <ToDoGroupDto> AddNewGroup(string groupTitle, CancellationToken cancellationToken) { ToDoGroupDto addedToDoGroup = await ODataClient .For <ToDoGroupDto>("ToDoGroups") .Action("CreateToDoGroup") .Set(new { title = groupTitle }) .ExecuteAsSingleAsync(cancellationToken); ToDoGroups.Add(addedToDoGroup); return(addedToDoGroup); }