how to filter records based on a particular field
Please help i have my API . my APi has a table employees which has a filed called gender . Please help how can i filter this table records based on gender.
Code:
Public Class EmployeesidController
Inherits ApiController
Public Function Getid(ByVal id As Integer) As Employee
Dim dbContext As SCHOOLEntities = New EmployeeDBContext
Return dbContext.Employees.Find(id)
End Function
End Class
Re: how to filter records based on a particular field
You use the Where method to filter when using LINQ to Entities or any LINQ provider.