1.From the user interface you have to send to the logic 2 paramters: the index of selected column (as
int
), and the
string
input by the user in the auto-complete textbox.
If your application is a web application the parameters above can be send by using jQuery and AJAX call to the code behind (or controller action), in the case of Windows Forms or WPF application you should controls events for doing this.
2.In the logic you have to use this two parameters and build 5 LINQ (one for each different columns) or a dynamic select query then use it to get the data from the database. Run the current query and returns only the maxim first "n" results like in the example bellow:
var results = query.Take(24).Select(a => new { label = a.Name });
return Json(results, JsonRequestBehavior.AllowGet);