// GET: Sport/Detail/{id} public ActionResult Details(int id) { var service = new SportService(); var model = service.GetSportById(id); return(View(model)); }
public ActionResult Edit(int id) { var service = new SportService(); var detail = service.GetSportById(id); var model = new SportEdit { SportId = detail.SportId, MediaType = detail.MediaType, League = detail.League, HomeTeam = detail.HomeTeam, AwayTeam = detail.AwayTeam, Location = detail.Location, Time = detail.Time, Network = detail.Network, Score = detail.Score }; return(View(model)); }