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;
using System.Data.Objects;

public partial class Take : 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.Take(10);

            foreach (Person reg in p)
            {
                Response.Write(reg.FirstName + " ");
                Response.Write(reg.LastName + "<p/>");
            }
        }
    }
}