Closed Thread
Results 1 to 3 of 3

Thread: LINQ DataContext class in depth

  1. #1
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Thumbs up LINQ DataContext class in depth

    Introduction

    Whenever someone asks me about the DataContext I always refer to it as the “brains” of Linq to SQL, why? Because it is. It is responsible for the translation of Linq to T-SQL, and the mapping of the results (rows) of that query to objects, and so much more.

    If you run any codegen tool (SqlMetal, or Linq to SQL file (VS Orcas designer)) you always get a class that derives from the DataContext class. The DataContext can be equated to a database, in that it contains a series of tables (normally this is implemented as a property that returns a Table), and sprocs (methods calls that invoke underlying sprocs at the DB layer).
    Note: The DataContext can also handle other SQL Server features like views, and table functions etc.
    What’s so special about the DataContext class?

    Most notably the DataContext takes some Linq code and generates the appropriate T-SQL statement for that query; if that query returns rows then the DataContext object will take care of mapping those rows to objects.

    Read More at hurricanesoftwares.com in .net Category

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    whoiga is offline Newbie
    Join Date
    Jun 2008
    Location
    United States
    Posts
    15
    Rep Power
    0

    Re: LINQ DataContext class in depth

    I think more people would find your threads if they were in the C# Tutorial forum, but this is some good stuff to know. I've not yet delved into LINQ throughout my C# advances, but the time will come.
    -Martin

  4. #3
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Re: LINQ DataContext class in depth

    Thanks, how can i post this is C# Tutorial now.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 10-21-2011, 08:21 AM
  2. Becoming An In Depth Programmer?
    By CommittedC0der in forum General Programming
    Replies: 6
    Last Post: 08-10-2011, 05:34 PM
  3. Replies: 2
    Last Post: 03-30-2011, 07:13 PM
  4. Search Depth
    By Apprentice123 in forum C and C++
    Replies: 3
    Last Post: 06-23-2010, 10:42 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts