public void UpdatePlayerRecord(int playerRecordId, PlayerRecord data) { var playerRecord = PlayerRecords.Find(playerRecordId); playerRecord.PlayedGames = data.PlayedGames; playerRecord.Won = data.Won; playerRecord.Tied = data.Tied; playerRecord.Lost = data.Lost; playerRecord.Assists = data.Assists; playerRecord.AllowedGoals = data.AllowedGoals; playerRecord.Goals = data.Goals; SaveChanges(); }
public PlayerRecord GetPlayerRecordById(int id) { return(PlayerRecords.Find(id)); }