public void AddResult(PokemonRankResult model) { Add(model); foreach (var item in model.BattleRecords) { Add(item); } }
public static ArenaResultsShortInfoViewModel ToViewModel(this PokemonRankResult model) => new ArenaResultsShortInfoViewModel() { Id = model.Id, Date = model.Date.ToLocalTime(), ElapsedMiliseconds = model.ElapsedMiliseconds, StepCount = model.StepCount, WinnerId = model.BattleRecords.Count == 0 ? -1 : model.BattleRecords.Last().ChallengerPokemonId };