public async Task <IActionResult> PutOne(int id, [FromBody] Role body) { await Db.Connection.OpenAsync(); body.id = id; var query = new BlogPostQuery(Db); var result = await query.FindOneAsync(id); if (result is null) { return(new NotFoundResult()); } // result.id = body.id; result.RoleName = body.RoleName; await query.UpdateAsync(body); return(new OkObjectResult(result)); }