You can create lcclsAccDueList
class constructor which takes source
and maps all the properties:
public class lcclsAccDueList
{
public lcclsAccDueList() {}
public lcclsAccDueList(tableItem source)
{
LedgerName = source.LedgerName;
LedgerId = source.LedgerId;
// (...)
}
public string LedgerName { get; set; }
public decimal LedgerId { get; set; }
// (...)
}
And then use it within your query:
dataentities db = new dataentities();
db.Tabel1.Select(x => new lcclsAccDueList(x)).ToList();
Or you can use auto mapping libraries, like automapper:
Create map:
Mapper.CreateMap<tableItem, lcclsAccDueList>();
And then use it within you query:
dataentities db = new dataentities();
db.Tabel1.Select(x => Mapper.Map<lcclsAccDueList>(x);).ToList();