Ejemplo n.º 1
0
        public bool MarkAsChosen(RestaurantDto restaurantVoted, DateTime dateTimeChosen)
        {
            restaurantVoted.LastChosenDate = dateTimeChosen;

            _restaurantRepository.Update(RestaurantDto.ToEntity(restaurantVoted));

            return(true);
        }
Ejemplo n.º 2
0
        public bool Vote(RestaurantDto restaurantVoted, PersonDto personVoted, DateTime dateTimeVote)
        {
            restaurantVoted.VotesDto.Add(new VoteDto()
            {
                DateTimeVote = dateTimeVote, PersonDto = new PersonDto {
                    PersonId = personVoted.PersonId, Name = personVoted.Name
                }
            });

            _restaurantRepository.Update(RestaurantDto.ToEntity(restaurantVoted));

            return(true);
        }