Ejemplo n.º 1
0
 public IList <BarDTO> GetBarDTO()
 {
     return((from b in _barRepo.List()
             select new BarDTO
     {
         Id = b.Id,
         Name = b.Name,
         PhoneNumber = b.PhoneNumber,
         Photo = b.Photo,
         Latitude = b.Latitude,
         Longitude = b.Longitude,
         HappyHour = b.HappyHour,
         GoogleBarId = b.GoogleBarId,
         PlaceId = b.PlaceId,
         Reviews = (from r in b.Reviews
                    select new BarReviewDTO()
         {
             Id = r.Id,
             Comment = r.Comment,
             Rating = r.Rating
         }).ToList()
     }).ToList());
 }
Ejemplo n.º 2
0
        public int GetBarIdByGoogleBarId(string GoogleBarId)
        {
            var BarId = _barRepo.List().FirstOrDefault(b => b.GoogleBarId == GoogleBarId).Id;

            return(BarId);
        }