public IActionResult Post([FromBody] Record actor) { if (!ModelState.IsValid) { return(BadRequest()); } int success = records.AddNewRecord(actor); if (success == 1) { return(Created("api/records", actor)); } return(BadRequest()); }