The issue is here:
Code:
List<Companies> results = query.ToList();
Your query is getting a single string property for each company, so calling ToList will return a List<string> but you're trying to assign it to a variable of type List<Companies>.
First things first, you need to decide whether this method is supposed to return the companies or just the names of the companies. If it's the former then you need to change your query to this:
Code:
var query = from c in entities.Companies
select c;
Note that the 'select' clause gets the whole object and not just one property of the object. You also need to change your binding code to this:
Code:
cmbCompanyNameSearch.DisplayMember = "CompanyName";
cmbCompanyNameSearch.DataSource = dal.GetcmbCompanyList();
If it's the latter then you need to change the name of the method to reflect that it's getting company names rather than companies and you also need to change the return type to List<string>.
Finally, what's up with this?
Code:
public List<Companies> GetcmbCompanyList()
Why is there a Hungarian prefix in your data access method? The DAL shouldn't even know that ComboBoxes exist, never mind that the data it returns is destined for one. Further, why are you using Hungarian Notation at all? It's not 1980 any more.