Esempio n. 1
0
 public IEnumerable <Fight> Get()
 {
     return(_fightService.GetAllFights()
            .Select(result => new Fight
     {
         Id = result.Id,
         PlayerId = result.PlayerId,
         BotId = result.BotId,
         FightLogs = result.FightLogs.Select(s => new FightLog
         {
             Id = s.Id,
             Turn = s.Turn,
             PlayerHitPoint = s.PlayerHitPoint,
             BotHitPoint = s.BotHitPoint,
             LogEntry = s.LogEntry
         }).OrderByDescending(log => log.Turn)
     }));
 }