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 7191681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:46:52+00:00 2026-05-28T19:46:52+00:00

I got confused on what are the differences between Linq-to-SQL and Entity Framework when

  • 0

I got confused on what are the differences between Linq-to-SQL and Entity Framework when following the database first approach as I can not find any clear differences.

In my case when I was using Linq-to-SQL I used to create the tables then I use Linq-to-SQL to create the classes that represents the tables, and now when I switch to Entity Framework I am still following the same steps (creating the database tables then create the associated classes using EF).

And I am interacting with these classes on the same way, for example I used to query the User class using the same syntax and approach but one time when the User class was created using Linq-to-SQL and the other time when it was created using EF, so where is the difference ?

        public IQueryable<User> findstudents(string term)
        {
            return from student in entities1.Users
                   where student.UserID.Contains(term)
                   select student;

        }

Second question if I use EF to map the tables into classes, is it still possible to use Linq-to-SQL in the same application to query the EF classes?

  • 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-28T19:46:53+00:00Added an answer on May 28, 2026 at 7:46 pm

    LINQ is a base technology – that’s the syntax that gives you the SQLish query options in C# – that’s totally independent of whether you use Linq-to-SQL or EF. So if you want to query your data classes using the LINQ syntax – you can do that with both frameworks – but once you use Linq-to-SQL and once you use Linq-to-Entities. You cannot use Linq-to-SQL against an Entity Framework EDMX model.

    Linq-to-SQL is great

    • if you need very simple 1:1 mapping – one table equals one class in your domain model
    • if you never need anything else but SQL Server (Linq-to-SQL doesn’t support anything else)
    • if you want to be up and running really quickly

    Entity Framework on the other hand

    • supports multiple backends (SQL Server, Oracle, Firebird – other will likely follow)
    • supports a full conceptual data modelling strategy – you define the physical model in the database, the conceptual model in your app, and the mapping between the two
    • gives you the ability to handle things like mapping a single business entity to several tables
    • support table-per-hierarchy and table-per-class inheritance scenarios
    • support refreshing/updating your model (EDMX file) from the database when things change (in Linq-to-SQL, you basically have to drop + recreate those entities involved – thus loosing all your customizations you might have made)

    In brief: Linq-to-SQL is a great, simple and lean’n’mean ORM for SQL Server – use it, if it does all you need. Entity Framework is quite a different beast, much more capable, but also more complex, much bigger – perfect for your next enterprise-critical app, but probably overkill for your personal blog app 🙂

    If you want to create something that’s “future-proof” and will use the OR technology that Microsoft is pushing into the future, then you should go with Entity Framework. Especially in v4, it’s also a lot easier to use, a lot more slimmed down and more useful than ever before.

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

Sidebar

Related Questions

I have the following code and got myself confused: I have a query that
I'm writing my first location based android app, but got confused about some of
I've got confused at the moment. I've got one database to developed for MLM
I am writing a generic repository for entity framework and am confused as to
I was looking at design pattern, but got confused between Factory and Abstract Factory
I got confused when I tried to parse following xml using libxmljs: <?xml version=1.0
First time using jQuery parent and got confused, here's my html: <div id=friends_inveni class=friends_rec
i was dealing with the following code,& got confused,please have a look at it
read many posts about the difference between the 3 idioms. But got more confused,
I've got confused . We hear a lot about Provider in ASP.NET . Membership-Provider

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.