Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7577807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:16:56+00:00 2026-05-30T17:16:56+00:00

This might be a very vague question but I guess I don’t really understand

  • 0

This might be a very vague question but I guess I don’t really understand what is going on. I asked a question earlier where I was told a simple way to “bind data to objects” is to just run a SqlConnection(connectionString). The response also included a comment saying I could get fancy with L2S and Entity Frameworks, so I looked deeper into those. It seems all you have to do with the DataContext object is point to the database. Why would SqlConnection be a benefit?

What is the difference (or pros/cons) of using either one of these? Is one more “standard”? Is one more modern?

P.S. I asked a lot of questions that don’t all need to be answered. I just wanted to add some clarity to my question and how much I don’t really understand this topic.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:16:58+00:00Added an answer on May 30, 2026 at 5:16 pm

    SqlConnection is part of the base, raw ADO.NET class library – the SQL Server part of that library, really. This is the foundation of all data access in .NET.

    With raw ADO.NET, you’re pretty “bare-bones” and close to the metal – you have to create your SQL queries and execute them, you get back rows and columns, very much like a relational database will give you.

    Pros: really close to the SQL, really powerful, best performance
    Cons: harder to write, more “glue” code, less type safety, tighter coupling to the underlying database structure


    DataContext (Linq-to-SQL) or ObjectContext (Entity Framework) are higher level abstractions – they sit on top of ADO.NET, but they (Linq-to-SQL or Entity Framework) offer so called ORM capabilities – here, you’re not really dealing with raw SQL statements and rows/columns, instead, those code generators will create an abstraction layer for you – which is built up from .NET objects. Each table in the database will be turned into a corresponding .NET class, with properties for all the columns in that table.

    Also, with L2S and EF, you’re typically using LINQ to query – your queries are much more C# like code, and L2s / EF will handle translating those queries you express in C# into actual SQL statements that SQL Server will execute.

    Pros: much easier to work with, much nicer to handle (objects with properties vs. raw rows/columns), type safety, ability to query with LINQ, higher dev productivity
    Cons: another layer means more translations, a hit on performance, not well suited for certain things (like bulk operations)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a very stupid question :P But I found this really interessting:
This might be a very basic and clueless question, but while I understand that
This might be a very newbie question, but I didn't find anything satisfying I
this might be a very very basic question, but what is the best way
This might be a very silly / stupid question, but, my defence is that
I know, this might be a very basic question but I am not 100%
:) This might look to be a very long question to you I understand,
All, This might be a very silly question, but in a Programming lang X
Am vb.net newbie. This question might be very novice and answered before, but i
This might be a very basic question, but I am a bit confused about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.