Avatar of altariamx2003
altariamx2003
Flag for Mexico asked on

The underlying provider failed on Open.

one of my friends send me this example to learn about entity framework

but it always show me the following error: "The underlying provider failed on Open." in this code:

        Public Function GetAllDepartments() As IEnumerable(Of Department) Implements IDepartmentRepository.GetAllDepartments
            Return Me.context.Departments.ToList()
        End Function

You can find the program in the following link: http://www.grupossc.com/VB.zip

Visual Basic.NET

Avatar of undefined
Last Comment
Bob Learned

8/22/2022 - Mon
Gautham Janardhan

which version of sql are you running ? if it's sql 2005 then the attached mdf in the source might be 2008 and you may to import in manually..
ASKER CERTIFIED SOLUTION
Bob Learned

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck