public async Task <ActionResult <bool> > DeleteContact([FromBody] Contact contact) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _repository.DeleteContact(contact); return(CreatedAtAction(nameof(Get), _repository.AllContacts())); }
public async Task <ActionResult <bool> > DeleteContact([FromBody] Contact contact) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _repository.DeleteContact(contact); return(CreatedAtAction(nameof(Get), _repository.AllContacts())); }