This is my code
public List<InvoiceJoin> ShowIvoiceList()
{
InvoiceJoin ij = new InvoiceJoin();
List<InvoiceJoin> list;
var data = (from t in _Entity.TblInvoices join t0 in _Entity.TblClients on new { ReceiverCode = t.ReceiverCode } equals new { ReceiverCode = t0.ClientCode }
select new
{
t.RakeNumber,
t.ReceiverCode,
t.ConsigneeCode,
t.InvoiceNumber,
t.InvoiceDate,
t.RecordStatus,
t0.ClientCode,
t0.ClientDescription,
t0.ClientAddress1,
t0.ClientAddress2,
t0.ClientAddress3,
t0.ClientCity,
t0.ClientState,
t0.ClientCountry,
t0.ClientZipCode,
}).ToList();
foreach (var item in data)
{
list.Add(item);
}
return list;
}
my invoicejoin class
public class InvoiceJoin
{
public TblInvoice invoice { get; set; }
public string Cdetails { get; set; }
public string Cname { get; set; }
public string Caddr { get; set; }
public string Pname { get; set; }
public string Paddr { get; set; }
}
Its not working I need to show two sql table data list in single view how i can do this in linq pls some ne help friends i need to show in html table. . .