@model LOC.Core.Model.Account.Account @{ ViewBag.Title = @Model.Name + "'s Profile"; int gamesPlayed = Model.PlayerStats.Count(); int wins = Model.PlayerStats.Count(x => x.Died == 0); int deaths = Model.PlayerStats.Count(x => x.Died != 0); int kills = 0; foreach (var stat in Model.PlayerStats) { if (stat.Kills != null) { kills += stat.Kills.Count; } } decimal winPercent = deaths == 0 ? 100 : kills / deaths * 100; }

@(Model.Name)'s Profile

Rank Winning Percentage Wins Losses K:D Ratio Kills Deaths
Test @(wins / gamesPlayed * 100)% @wins @deaths @winPercent% @kills @deaths