0
votes

Some background information: I am creating a Silverlight WCF RIA Services Project. I started off by creating a Silverlight Business Application and adding a Domain Service Class and an ADO.Net Entity Data Model to hook up to my SQL database.

Inside of the SQL database I have about 15 tables.

I am pretty much just doing basic WCF calls and on one table it is giving me an error. This same code works for every other table, and I cannot figure out why.

Here is the code on the server side:

Public Function GetTblRebates() As IQueryable(Of tblRebate)
    Return Me.ObjectContext.tblRebates
End Function

Here is the code to call the WCF Service:

Private ctx As New MapDomain
Dim op2 = ctx.Load(ctx.GetTblRebatesQuery)
AddHandler op2.Completed, New EventHandler(Function(s, ev)
                                                   MessageBox.Show(op2.Entities.ToList.Count)
                                               End Function)

After I made this call I got a 4004 error. I went to Debug --> Detach All, and it tells me that the error is "Load operation failed for query 'GetTblrebates'. The remote server returned an error: NotFound.

I placed a breakpoint on the server side GetTblRebates() and when I hovered over "Me.ObjectContext.tblRebates" it said that the 'tblRebates' is not a member of 'TContext'.

I have searched around for this error and could not find anything about it. Any help would be greatly appreciated!

If you need anymore information let me know.

Thank you!

1
I have tried deleting out the ADO.Net Entity Data Model and the Domain Service Class to start over and it still has the same error. Any ideas?Jeff

1 Answers