using System;
using System.Linq;
using ServiceReference1;
using System.Data.Common;
using System.Data.Objects;


public partial class _Default : System.Web.UI.Page
{
    private Uri svcUri = new Uri("http://localhost/WCFDataServices/WcfDataService.svc");

    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            var contexto = new SchoolEntities(svcUri);
            var query = from p in contexto.Person
                        select p;
            GridView1.DataSource = query;
            GridView1.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }       
    }   
}