I've been getting this error when I try and use my model container:
No connection string named 'PFModelContainer' could be found in the application config file.
I have my edmx file in a separate project. I checked the app.config file and my model was there, and I also put it in my main project app.config file. Still doesn't work. Here's the connection string:
provider connection string="
Data Source=C:\Documents and Settings\Jon\My Documents\Visual
Here's how the context is called:
Private mdbContext As New PFModelContainer
Which goes to:
Partial Public Class PFModelContainer
Public Sub New()
I thought the answer would be similar to what happened to this guy. But unfortunately his solution doesn't work with mine.
I've noticed the error isn't caught until I hit this code. It occurs when I do the linq query on the third line.
Dim dbContext As New PFModelContainer
Dim dbAccount As IQueryable(Of Account)
dbAccount = From a In dbContext.Accounts
Where (a.AccountName = "Hello")