-1

what is the difference between Linq and entity framework. And which is the best approach among both.

4
  • LINQ is an query language while Entity Framework is a object relational mapper. Both of them are from Microsoft and their purposes are different. Commented Jul 9, 2015 at 5:40
  • Perhaps he meant LINQ to SQL, not LINQ in general? Commented Jul 9, 2015 at 5:45
  • I think he want to ask difference between LINQ to SQL and entity framework. Commented Jul 9, 2015 at 5:47
  • he's got to ask a question properly. Commented Jul 9, 2015 at 5:53

2 Answers 2

3

I think you are a little confused. LINQ is a method for querying objects that is integrated to the language. Entity Framework is an OR/M mapper that maps the model to objects. LINQ helps Entity Framework to achieve that efficiently.


Linq definition is,

Short for Language INtegrated Query, LINQ is set of classes added to the .NET Framework 3.5 along with language enhancements added to C# 3.0 and Visual Basic 9, the versions of the language that ship with Visual Studio 2008. LINQ adds a rich, standardized query syntax as a first-class citizen in .NET programming languages that allows developers to interact with any type of data.

Entity framework definition is,

Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write. Get itAdd this to your project and start taking advantage of this powerful O/RM.

Links: LINQ and Entity Framework

Sign up to request clarification or add additional context in comments.

1 Comment

this is more kind of comment. Please comment in the comments section.
1

Difference between Entity Framework and LINQ to SQL.

The primary difference between the two frameworks is how they handle your models.

The basic rule of thumb for which framework to use is how to plan on editing your data in your presentation layer.

Linq-To-Sql - use this framework if you plan on editing a one-to-one relationship of your data in your presentation layer. Meaning you don't plan on combining data from more than one table in any one view or page.It can be used for rapid application development only with SQL Server.

Entity Framework - use this framework if you plan on combining data from more than one table in your view or page.It can be used for rapid application development with RDBMS like SQL Server, Oracle, DB2 and MySQL etc.

For more information Just Click here

.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.