In this sample I use an entity modle from my FamilyTree database.
AhouraEntities model = new AhouraEntities();
ObjectQuery people = model.Person;
var panahy = from person in people
where person.Surname.StartsWith("Panah")
select new
{
person.ID,
person.Name
};
grdPeople.DataSource = people;
grdPeople.DataBind();
lstPanahy.DataSource = panahy;
lstPanahy.DataBind();
Obviously you could instanciate the model using the constructor that expects a connectionString.
No comments:
Post a Comment