public bool UpsertPhone(Phone phone) { if (phone is null) { throw new EntityNotFoundException("User -> Phone"); } var current = Phones.FirstOrDefault(r => r.Type == phone.Type); if (current is null) { Phones.Add(phone); } else { current = phone; } return(true); }
public override string ToString() { return($"{Address}, {Phones.FirstOrDefault()}, ${Price}, R:{Rooms}, {Uri}"); }
public string GetPhone() => Phones?.FirstOrDefault()?.Formatted;