To retrieving entities table data with IQueryable in c#.

Jitendrasoft09
Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 1155
using System;
using System.Linq;
using NorthwindModel;

class JkExample {

static void Main(string[] args) {


NorthwindEntities context = new NorthwindEntities();


IQueryable<Employee> result = from e in context.Employees
where e.City == "Bangalore"
select e;


foreach (Employee e in result) {
Console.WriteLine("Name: {0} {1}", e.FirstName, e.LastName);
}



Console.ReadLine();
}
}

Comments or Responses

Login to post response