Пример #1
0
        public async Task <ActionResult <bool> > DeleteContact([FromBody] Contact contact)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _repository.DeleteContact(contact);

            return(CreatedAtAction(nameof(Get), _repository.AllContacts()));
        }