Showing posts with label SELECT. Show all posts
Showing posts with label SELECT. Show all posts

Thursday, August 22, 2019

Entity Framework Core Select all rows from a Table

Selecting all the rows from a table is very simple, assuming that we have setup the Entity Framework Core context and generated all the Models we can use the context object to select all the rows from the Employee tables as follows.

List_context.Employee.ToList();


If we want to get all the Employees in a MVC Controller then the controller will be as follows