Hi guys I have made following program,
I don't get any result in the console.
also how do I return the list result in console?
Could someone help me?
Thank you in advance
I don't get any result in the console.
also how do I return the list result in console?
Code:
namespace MyProgram
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Company test = new Company();
test.CompanyN();
}
}
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();
}
}
}
Could someone help me?
Thank you in advance