private Apartment FindApartment(Apartment apartment) { Apartment res = null; User user = _userRepository.GetUserByPhone(apartment.User.Phone); Street street = _streetRepository.GetStreetByName(apartment.Address.Street); if ((user != null) && (street != null)) { res = _apartmentRepository.FindApartment(street.StreetID, agent.AgentID, apartment.Floor, apartment.Square); } return(res); }