Friday, August 23, 2019

Entity Framework Core Select one row from a Table

To select a specific row from a table, we need to use the Select clause and pass the id of the row to be obtained. Let us say we want to get the Employee with EmployeeId = 1 from the employee table then the EF Core query will be as follows.

            var Employee = _context.Employee.Select(e => e.EmployeeId == 1);

Search Flipkart Products:
Flipkart.com

No comments: