View Single Post
  #8 (permalink)  
Old October 29th, 2013, 03:35 PM
daveharney daveharney is offline
Authorized User
Points: 353, Level: 6
Points: 353, Level: 6 Points: 353, Level: 6 Points: 353, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default Another Attempt

Hi Imar,

I added a connection string in the config file for "entities" and tried this (no luck)

Code:
Imports TestTable1
Imports Entities
Imports System.Data
Imports System.Linq
Imports System.IO

Partial Class _Default
    Inherits System.Web.UI.Page

    Public Function GridView1_GetData() As IQueryable 
        Using myentities As New Entities()
            Dim myquery = From mytable In myentities.TestTable1 Select mytable
            Return myquery
        End Using
    End Function
End Class
Error for myquery line is:

An exception of type 'System.Data.Entity.Core.MetadataException' occurred in EntityFramework.dll but was not handled in user code

Will appreciate help whenever you have time - thanks.
Reply With Quote