Exemplo n.º 1
0
        public async Task <IActionResult> CreateAsync(int id, InputModel input)
        {
            var collection = await _collectionRepository.FindAsync(id);

            var result = await _todoItemRepository.AddAsync(collection, input.Build());

            return(new CreatedAtRouteResult("ShowItem", new { id = result.Id }, result));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateAsync(InputModel input)
        {
            var result = await _repository.AddAsync(input.Build());

            return(new CreatedAtRouteResult(
                       "ShowCollection",
                       new { id = result.Id },
                       result));
        }