Write a query to get the single employee name when there are many employees whose name is "test" in the database ?

 Posted by Akiii on 10/30/2012 | Category: LINQ Interview questions | Views: 5249 | Points: 40

var employee = (from h in contextobject.Employee 

where h.EmployeeName == "test"
select h).FirstOrDefault<Employee>();

Thanks and Regards

| Alert Moderator 

Comments or Responses

Login to post response