Hello
in a combobox the user writes the city and the program should search for this city according to written characters obviously do a search in a sql table that has over 9000 records. I set of keywords to speed everything but I ask you, which of the two methods of code is more powerful?
Protected Sub luogoresidenza_ItemsRequested(sender As Object, e As RadComboBoxItemsRequestedEventArgs) Handles luogoresidenza.ItemsRequested Using Context As New touristEntities If Not [String].IsNullOrEmpty(e.Text) Then Dim Query = (From c In Context.Tab_comuni_nazioni Where c.c_descrizione.StartsWith(e.Text) Order By c.c_descrizione Select c.c_idrecord, c.c_descrizione).ToList Dim query1 = Query.Skip(e.NumberOfItems).Take(10) luogoresidenza.DataSource = query1 luogoresidenza.DataBind() Dim endOffset As Integer = e.NumberOfItems + query1.Count() Dim totalCount As Integer = Query.Count() If endOffset = totalCount Then e.EndOfItems = True End If e.Message = [String].Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, totalCount) End If End Using End SubOr better to use a web service?