public ActionResult Update(int id, [FromBody] EnvironmentViewModel env) { if (env.Id != id) { return(BadRequest()); } if (!_repo.ExistsEntity(id)) { return(NotFound()); } _repo.Update(_mapper.Map <Environment>(env)); return(NoContent()); }
public ActionResult Update(int id, [FromBody] EnvironmentViewModel env) { if (env.Id != id) { return(BadRequest()); } if (!_repo.ExistsEntity(id)) { return(NotFound()); } _repo.Update(_mapper.Map <Environment>(env)); return(NoContent()); }