Solved MVC LINQ to SQL

Posted on 2011-10-12
Last Modified: 2013-12-16
I am creating a 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?
Question by:wademi
    LVL 59

    Accepted Solution

    Here is a nice tutorial on how to use LINQ.

    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:

    LVL 13

    Assisted Solution

    LVL 3

    Assisted Solution

    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.

    Author Closing Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Viewers will learn how the fundamental information of how to create a table.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now