I created a .NET solution with two projects:
The ToyData project contains Toy.edmx, an ADO.NET entity data model generated from a database called Toy.
The ToyOne project contains this Window1.xaml.vb file:
1 Imports ToyData
2
3 Class Window1
4
5 Private Sub Window1_Loaded (_
6 ByVal sender As System.Object, _
7 ByVal e As System.Windows.RoutedEventArgs) _
8 Handles MyBase.Loaded
nine
10 Dim dc As New ToyEntities
11 Label1.Content = (From c As Client In dc.ClientSet _
12 Select c) .First
thirteen
14 End Sub
fifteen
16 End Class
It throws this exception at runtime in the automatically generated Toy.Designer.vb file:
The specified named connection is either not found in the configuration,
not intended to be used with the EntityClient provider, or not valid.
What am I doing wrong?
Zack peterson
source share