Example #1
0
        public void Handle(AddGameToLibrary addGame)
        {
            var game = new GameDTO {
                Id      = Guid.NewGuid(),
                Title   = addGame.Title,
                Notes   = addGame.Notes,
                Rating  = addGame.Rating,
                AddedOn = DateTime.Now,
            };

            games.Add(game);
        }
        public IEnumerable<IResult> AddGame()
        {
            CommandResult add = new AddGameToLibrary
                                    {
                                        Title = Title,
                                        Notes = Notes,
                                        Rating = Rating
                                    }.AsResult();

            _wasSaved = true;

            yield return add;
            yield return Show.Child<SearchViewModel>().In<IShell>();
        }