using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ServiceReference1;

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);
            var arr = new[] { 0, 1, 2, 3, 4, 5 };
        }
    }
}