public async Task <IActionResult> GetRecord([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var record = await _recordService.FindBy(m => m.RecordId == id); if (record == null) { return(NotFound()); } return(Ok(record)); }