Select All Rows Using Entity Framework

前端 未结 8 518
无人共我
无人共我 2021-02-01 00:48

I\'m trying to select all the rows out of a database using entity framework for manipulation before they\'re sent to the form

var ptx = [modelname].[tablename]()         


        
8条回答
  •  南方客
    南方客 (楼主)
    2021-02-01 01:27

    You can use this code to select all rows :

    C# :

    var allStudents = [modelname].[tablename].Select(x => x).ToList();
    

提交回复
热议问题