public void UpdatePlayer(PlayerBL element) { Player toUpdate = DB.Players.Read(element.Id); if (toUpdate != null) { toUpdate = Mapper.Map <Player>(element); DB.Players.Update(toUpdate); DB.Save(); } }
public void AddPlayer(PlayerBL element) { DB.Players.Create(Mapper.Map <Player>(element)); DB.Save(); }