You are exiting from function before iterating the list. Try to put
return Result.ToList();
as last statement of the function.
public class Company
{
public IEnumerable<Company> CompanyN(int Cname)
{
myDB tdc = new myDb();
var Result= tdc.ExecuteQuery<Company>(@"SELECT TOP (10) [t0].[Id], [t0].[IdAnonymous], [t0].[Name], [t0].[Address1], [t0].[Address2], [t0].[PostalCode], [t0].[City], [t0].[Country], [t0].[Phone], [t0].[Fax], [t0].[Email], [t0].[Web], [t0].[VAT], [t0].[Agreement], [t0].[AgreementEndDate], [t0].[TradosTM], [t0].[PathRefMaterial], [t0].[PaymentTerms], [t0].[Owner], [t0].[CreationDate], [t0].[PriceListName], [t0].[Currency], [t0].[IsActive], [t0].[LogoBlob]FROM [CompanyMain] AS [t0]");
foreach (var c in Result)
{
Console.WriteLine(c);
}
return Result.ToList();
}