Beispiel #1
0
        public async Task <IHttpActionResult> GetGroup(int id)
        {
            var group = await _valueProvider.GetValueAsync(id);

            if (group == null)
            {
                return(NotFound());
            }
            var groupDto = new GroupDto()
            {
                GroupId = group.GroupId,
                Name    = group.Name,
                UserId  = group.UserId
            };

            return(Ok(groupDto));
        }
Beispiel #2
0
        public async Task <IHttpActionResult> DeleteToDoList(int id)
        {
            var item = await _valueProvider.GetValueAsync(id);

            if (item == null)
            {
                return(NotFound());
            }
            await _valueProvider.DeleteValueAsync(id);

            return(Ok());
        }