• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 529
  • Last Modified:

C#.net MVC LINQ to SQL

I am creating a C#.net MVC application for the first time. I would like to use LinQ to SQL to interact with my database
My database is SQL Server 2008 and I will only be connecting to 1 table from my database.

Can someone give me some guidelines how to connect to the SQL database?
0
wademi
Asked:
wademi
3 Solutions
 
Kevin CrossChief Technology OfficerCommented:
Here is a nice tutorial on how to use LINQ.

http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx

Essentially when you establish that you are adding a LINQ-To-SQL class, you are prompted to setup the connection to SQL Server. Scott links to a few related articles, but probably an important one is the video walkthrough showing the process of getting started with LINQ:
http://www.scottgu.com/blogposts/video/linqtalk1.wmv

Kevin
0
 
sameer2010Commented:
0
 
Marcin_ZawadzkiCommented:
Just create SQL 2 SQL Classes item to project and drag your table from server explorer into designer.
And your Linq 2 SQL is ready to work.
0
 
wademiAuthor Commented:
deff
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now