public IHttpActionResult Get(long id) { if (EmployeesList == null || EmployeesList.Count == 0) { return(NotFound()); } var employee = EmployeesList.FirstOrDefault(e => e.EmployeeNo == id); if (employee == null) { return(NotFound()); } return(Ok(employee)); }