public IActionResult Get(int id) { var Users = _UserdataRepository.GetAll(); var Locations = _LocationdataRepository.GetAll(); var SavedLocations = _dataRepository.GetAll(); var query = from User in Users join SavedLocation in SavedLocations on User.UserId equals SavedLocation.UserId join UserLocation in Locations on SavedLocation.SavedLocationId equals UserLocation.SavedLocationId where User.UserId == id select new { UserLocation.CityName }; return(Ok(query)); }
public IActionResult Get() { IEnumerable <UserLocation> users = _dataRepository.GetAll(); return(Ok(users)); }