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

altariamx2003Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Bob LearnedConnect With a Mentor Commented:
Looking at the connection string should give you some clue, because I am thinking (without looking) that this is an SQL Server Express edition error.  I had the same problem with NerdDinner example for ASP.NET MVC 2.
0
 
Gautham JanardhanCommented:
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..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.