title: Generate the message in case of empty data
body: <p>I have a Query about a vb.net code.
  I am using ADO.NET Entity Framework Data Model with a desktop app.</p>
  
  <p>MY functionality is right now.
  When I find a data from the database it generates a message as you can see in the code.</p>
  
  <p>MY question is
  How can i generate a message when there is no matching data in DB?</p>
  
  <pre><code> Private Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click
          Using db As SMSTEntities = New SMSTEntities()
              Try
                  Dim Query = From PhoneNumber In db.PhoneNumberOfCustomers
                              Where PhoneNumber.PhoneNumber.Equals(txtNumber.Text) Select PhoneNumber
  
  
                  For Each phoneNumber In Query
                      MessageBox.Show("Your Searched Data " + txtNumber.Text + " Is Present in Database, Please Insert the Releated Information")
                  Next
              Catch ex As Exception
                  MessageBox.Show(ex.Message)
              End Try
          End Using
  
      End Sub
  </code></pre>
  
  <p>How can i use if else statement in this case.
  Any help is welcome.
  Thanks in advance.</p>