我正在尝试从 linq 查询中获取一些记录
dataentities db = new dataentities();
db.Tabel1.Select(x=> new lcclsAccDueList {LedgerName ,LedgerId,Amount ,AmountInString ,Expr2,Name ,StopID ,VIP }).ToList();
我做了这门课
public class lcclsAccDueList
{
public string LedgerName { get; set; }
public decimal LedgerId { get; set; }
public Nullable<decimal> Amount { get; set; }
public string AmountInString { get; set; }
public Nullable<int> Expr2 { get; set; }
public string Name { get; set; }
public Nullable<decimal> StopID { get; set; }
public Nullable<bool> VIP { get; set; }
}
有没有其他方法可以选择所有记录,例如
dataentities db = new dataentities();
db.Tabel1.Select(x=> new lcclsAccDueList { * }).ToList();
// * indicates select all records