public void UpdateStarr(Starr starr) { Starr toUpdate = GetStarrById(starr.Id); if (toUpdate != null) { toUpdate.CopyFrom(starr); } }
public IActionResult EditStarr(int id) { Starr sf = logic.GetStarrById(id); if (sf == null) { return(NotFound(id)); } return(View(sf)); }
public Starr GetStarrById(int id) { Starr foundStarr = starrs.Find(s => s.Id == id); if (foundStarr != null) { return(foundStarr); } else { throw new Exception("There is no starr with that ID!"); } }
public void UpdateStarr(Starr sf) { throw new NotImplementedException(); }
public IActionResult EditStarr(Starr starr) { logic.UpdateStarr(starr); return(RedirectToAction("StarrList")); }
public void UpdateStarr(Starr sf) { repo.UpdateStarr(sf); }
public void UpdateStarr(Starr sf) => context.UpdateStarr(sf);