title: Dataset bind to Gridview within WCF REST retrieval method and Linq to Sql
body: <p>I used a WCF REST template to build a WCF service library to create PUT and GET calls. PUT method works fine sending my blob to a database.<br>
  On the GET, I want to be able to access the web service directly and display the results from a stored procedure as a dataset and bind this to a gridview. The stored procedure is a simple select statement, returning three of the four columns from the table. I have the following:</p>
  
  <pre><code>[WebGet(UriTemplate = "/?name={name}", ResponseFormat = WebMessageFormat.Xml)]  
  public List&lt;Object&gt; GetCollection(string name)  
  {  
          try  
          {      
                   db.OpenDbConnection();  
               // Call to SQL stored procedure  
                  return db.GetCustFromName(name);  
          }  
          catch (Exception e)  
          {  
              Log.Error("Stored Proc execution failed. ", e);  
          }  
          finally  
          {  
              db.CloseDbConnection();  
          }  
          return null;  
  }
  </code></pre>
  
  <p>I also added Linq to SQL class to include my database table and stored procedures access. I also created the Default.aspx file in addition to the other required files. </p>
  
  <pre><code> protected void Page_Load(object sender, EventArgs e)  
   {  
          ServiceDataContext objectContext = new ServiceDataContext();            
              var source = objectContext.GetCustFromName("Tiger");  
              Menu1.DataSource = source;  
              Menu1.DataBind();  
   }  
  </code></pre>
  
  <p>But this gives me The entity type '' does not belong to any registered model.</p>
  
  <p>Where should the data binding be done? What should be the return type for GetCollection()? I am stuck with this. Please provide help on how to do this. </p>