public IHttpActionResult Put([FromBody] UpdateValueDTO update) { if (!this.valuesService.Update(update)) { return(this.BadRequest("Value was not updated")); } return(this.Ok(203)); }
public bool Update(UpdateValueDTO update) { if (this.repository.Count == 0 || this.repository.Count <= update.AtIndex || update.AtIndex < 0) { return(false); } this.repository[update.AtIndex] = update.Value; return(true); }