public async Task <object> Block([FromBody] int cardId) { Card card = new Card(); try { card = _cardRepository.Block(cardId); } catch (Exception ex) { result = false; error = ex.Message; } return(new SingleResponse <Card> { Message = "Card blocked successfully", DidError = !result, ErrorMessage = error, Token = string.Empty, Model = card }); }