Menu ▼

Previous Next

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();

}

Previous Next




Search dotnetlearners.com