public PlaayersVm EditPlayer(int?id) { Player player = Context.Players.Find(id); PlaayersVm model = Mapper.Map <Player, PlaayersVm>(player); return(model); }
public ActionResult EditPlayer(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlaayersVm blogArticleBm = service.EditPlayer(id); if (blogArticleBm == null) { return(HttpNotFound()); } return(View(blogArticleBm)); }