In the following code that returns a list:
public List GeAllCust()
{
var results = db.Customers
.Select(x => new { x.CustName,
I guess Customer
is a class you have defined yourself?
The my suggestion would be to do something like the following:
var results = db.Customers.Select(x => new Customer(x.Custname, x.CustEmail, x.CustAddress, x.CustContactNo)).ToList();
The reason is that you are trying to return a list of Customer
but the results from your link is an anonymous class containing those four values.
This would of course require that you have a constructor that takes those four values.