'How to connect an ASP.NET MVC 3 application to a SQL Server 2008 database

I am novice user of ASP.NET MVC application. I am trying to learn mvc but I am unable to connect database to my application. Whenever I am going to add controller with model it shows error shown in imageenter image description here

My server name is winultimate-PC and database name is content

So please help me how can I connect this application with SQL Server.

I am also attaching model class to which I want to attach my database

Thanks in advance

enter image description here



Solution 1:[1]

The following link provides details about how to connect MS SQL SERVER 2008 database to asp.net MVC Application

http://www.w3schools.com/aspnet/mvc_database.asp

Solution 2:[2]

Your missing the [Key] annotation in you Welder entity.

[Key]
public int ID 
{ 
    get; 
    set; 
}

You also need to add the following using statement:

System.ComponentModel.DataAnnotations;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 XN16