Query Microsoft Access MDB Database using LINQ and C#

后端 未结 6 1597
庸人自扰
庸人自扰 2020-11-27 05:02

I have a *.MDB database file, and I am wondering if it is possible or recommended to work against it using LINQ in C#. I am also wondering what some simple examples would lo

6条回答
  •  执笔经年
    2020-11-27 05:16

    You can use a DataSet. There are linq extensions that will allow you to query the data with all that LINQ goodness we have become use to :)

    eICATDataSet.ICSWSbuDataTable tbl = new eICATDataSet.ICSWSbuDataTable();
    
    ICSWSbuTableAdapter ta = new ICSWSbuTableAdapter();
    ta.Fill(tbl);
    
    var res = tbl.Select(x => x.ProcedureDate.Year == 2010);
    

提交回复
热议问题