using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AlfredoLotar.Livro.Aspnet.SchoolModel;

public partial class Where : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void bntExecutar_Click(object sender, EventArgs e)
    {
        using (SchoolEntities contexto = new SchoolEntities())
        {
            //IQueryable<Person> p = contexto.Person.Where("it.PersonID >30");
            IQueryable<Person> p = contexto.Person.Where(t => t.FirstName.StartsWith("a"));
            foreach (Person reg in p)
            {
                Response.Write(reg.FirstName + " ");
                Response.Write(reg.LastName + "<p/>");
            }
        }
    }
}