Beispiel #1
0
        public OperationResultListVo <GameViewModel> GetAll(Guid currentUserId)
        {
            try
            {
                IEnumerable <Game> allModels = gameDomainService.GetAll();

                IEnumerable <GameViewModel> vms = mapper.Map <IEnumerable <Game>, IEnumerable <GameViewModel> >(allModels);

                return(new OperationResultListVo <GameViewModel>(vms));
            }
            catch (Exception ex)
            {
                return(new OperationResultListVo <GameViewModel>(ex.Message));
            }
        }
 public IEnumerable <GameDto> GetAll()
 {
     return(MapFromEntitiesToDtos(_gameDomainService.GetAll(), DomainToDtoEnum.Game));
 }