public User GetUserByBeacon(int id) { var beaconRepository = new BeaconRepository(); var userRepository = new UserRepository(); var beacon = beaconRepository.GetBeacon(id); if (beacon == null) { return(null); } return(userRepository.GetUser(beacon.UserId)); }
public Beacon GetBeaconById(int id) { var repository = new BeaconRepository(); return(repository.GetBeacon(id)); }