Getting error while implementing Code First modal in MVC application

I have created a sample MVC application from here:


I am using Visual Studio 2010 IDE. See the Setting the Connection String section.

Instead of SQL Server Compact Edition I want to directly work with SQL Server 2008 that is installed on my system so when I put following connection string in web.config i got an error message:

<add name="SchoolContext" connectionString="server=(local);database=School;user id=sa;password=1234;" providerName="System.Data.SqlClient" />

How to resolve this error?


Does the School database already exist? If so, delete it and let Code First recreate it.

Need Your Help

Django Rest Framework: Disable field update after object is created

django rest django-rest-framework

I'm trying to make my User model RESTful via Django Rest Framework API calls, so that I can create users as well as update their profiles.

How add html and text files to Sphinx index?

html search indexing search-engine sphinx

From Sphinx reference manual: «The data to be indexed can generally come from very different sources: SQL databases, plain text files, HTML files, mailboxes, and so on»

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.