public async Task <IActionResult> EditCard([FromBody] Card card) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var p = await _cardRepo.EditCard(card); if (p != null) { return(NoContent()); } throw new Exception($"Fail to edit card!"); }