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

public partial class Top : 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())
        {
            //ObjectQuery<Person> p = contexto.Person.Top("@limite", new ObjectParameter("limite", 10));
            ObjectQuery<Person> p = contexto.Person.Top("10");
            
            foreach (Person reg in p)
            {
                Response.Write(reg.FirstName + " ");
                Response.Write(reg.LastName + "<p/>");
            }
        }
    }
}
