public void UpdateStarr(Starr starr)
        {
            Starr toUpdate = GetStarrById(starr.Id);

            if (toUpdate != null)
            {
                toUpdate.CopyFrom(starr);
            }
        }
Beispiel #2
0
        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!");
            }
        }
Beispiel #4
0
 public void UpdateStarr(Starr sf)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public IActionResult EditStarr(Starr starr)
 {
     logic.UpdateStarr(starr);
     return(RedirectToAction("StarrList"));
 }
Beispiel #6
0
 public void UpdateStarr(Starr sf)
 {
     repo.UpdateStarr(sf);
 }
Beispiel #7
0
 public void UpdateStarr(Starr sf) => context.UpdateStarr(sf);