public ActionResult Put(int id, String picture) { var location = _TripAdvisorContext.Locations.SingleOrDefault(loc => loc.id == id); if (location != null) { location.linkPicture = picture; _TripAdvisorContext.SaveChanges(); return(Ok()); } return(NotFound()); }
public ActionResult Put(int id, String content) { var opinion = _TripAdvisorContext.Opinions.SingleOrDefault(opi => opi.id == id); if (opinion != null) { opinion.Content = content; _TripAdvisorContext.SaveChanges(); return(Ok()); } return(NotFound()); }