// PUT: api/Lector/5 public IHttpActionResult Put(int id, Lector lector) { if (!ModelState.IsValid || lector.Id != id) { return(BadRequest()); } var rest = _repo.Get(id); if (rest != null) { _repo.Update(lector); return(Ok()); } return(NotFound()); }
public async Task <Lector> Update(Lector lector) { return(await _lectorRepository.Update(lector)); }