public async Task <IActionResult> Delete([FromRoute] string id)
        {
            try
            {
                await _contactsService.DeleteAsync(new ObjectId(id));
            }
            catch (NotFoundException)
            {
                return(NotFound());
            }

            return(Ok());
        }
Beispiel #2
0
        public async Task <IActionResult> Delete(int id)
        {
            await _contactsService.DeleteAsync(id);

            return(Ok());
        }