Exemplo n.º 1
0
 public static QueryGameResult Create(Core.Entties.Game.Game game)
 {
     return(new QueryGameResult
     {
         Id = game.Id,
         Name = game.Name,
         AvarageRating = game.AvarageRating,
         Category = game.Category,
         Description = game.Description,
         ImageUrl = game.ImageUrl,
         ReleaseDate = game.ReleaseDate
     });
 }
Exemplo n.º 2
0
 public static GameViewModel Create(Core.Entties.Game.Game game)
 {
     return(game == null ? null : new GameViewModel
     {
         Id = game.Id,
         AvarageRating = game.AvarageRating,
         Category = game.Category,
         Description = game.Description,
         Comments = game.Comments.Select(x => Comment.Create(x)).ToList(),
         ImageUrl = game.ImageUrl,
         Name = game.Name,
         ReleaseDate = game.ReleaseDate
     });
 }