public async Task <IActionResult> GetById([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var cheque = await _chequeRepository.GetAsync(id); if (cheque != null) { return(Ok(cheque)); } else { return(BadRequest()); } }