LINQ to Entities

LINQ to entities will be used in Entity frame work. below is the syntax for writing linq query on entity "ExampleEntity".

LINQ Query:

using (ExampleEntity context = new ExampleEntity()) { IQueryable<string> productNames = context.Employees .Select(e => e.EmployeeName); gvemployees.DataSource = productNames; gvemployees.DataBind(); }