public async Task <IActionResult> Update(ColumnViewModel columnViewModel) { var isSuccess = await _columnService.UpdateColumnAsync(columnViewModel); if (!isSuccess) { return(this.BadRequestResult("更新失败!")); } return(Ok()); }
public async Task <IActionResult> Put(int id, [FromBody] Column column) { if (!(await ColumnService.IsValidRequestBody(column, id))) { return(BadRequest()); } if (!await ColumnService.IsColumnUnique(column)) { return(Conflict()); } await ColumnService.UpdateColumnAsync(id, column); return(NoContent()); }