public PlayerRankingStatsViewModel(PlayerRecord playerRecord)
 {
     PlayerName = playerRecord.Player.Name;
     ImageUrl = playerRecord.Player.ImageProfileUrl;
     Performance = playerRecord.Performance;
     Won = playerRecord.Won;
     Lost = playerRecord.Lost;
     Tied = playerRecord.Tied;
     Goals = playerRecord.Goals;
     Assists = playerRecord.Assists;
 }
示例#2
0
 public static double CalculatePerformance(PlayerRecord pRecord)
 {
     return CalculatePerformance(pRecord.PlayedGames,pRecord.Wins,pRecord.Losts,pRecord.Draws,pRecord.Assists,pRecord.Goals,pRecord.AllowedGoals);
 }
示例#3
0
 public static double CalculatePerformance(PlayerRecord pRecord)
 {
     return(CalculatePerformance(pRecord.PlayedGames, pRecord.Won, pRecord.Lost, pRecord.Tied, pRecord.Assists, pRecord.Goals, pRecord.AllowedGoals));
 }
 public void CreatePlayerRecord(PlayerRecord playerRecord)
 {
     PlayerRecords.Add(playerRecord);
     SaveChanges();
 }
 public void UpdatePlayerRecord(int playerRecordId, PlayerRecord data)
 {
     var playerRecord = PlayerRecords.Find(playerRecordId);
     playerRecord.PlayedGames = data.PlayedGames;
     playerRecord.Wins = data.Wins;
     playerRecord.Draws = data.Draws;
     playerRecord.Losts = data.Losts;
     playerRecord.Assists = data.Assists;
     playerRecord.AllowedGoals = data.AllowedGoals;
     playerRecord.Goals = data.Goals;
     SaveChanges();
 }
 public void RemovePlayerRecord(PlayerRecord playerRecord)
 {
     PlayerRecords.Remove(playerRecord);
     SaveChanges();
 }
 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();
 }