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 }); }
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 }); }