what is the difference between Linq and entity framework. And which is the best approach among both.
-
`LINQ` is an query language while `Entity Framework` is a object relational mapper. Both of them are from Microsoft and their purposes are different. – Amit Kumar Ghosh Jul 09 '15 at 05:40
-
Perhaps he meant LINQ to SQL, not LINQ in general? – Charles Burns Jul 09 '15 at 05:45
-
I think he want to ask difference between LINQ to SQL and entity framework. – Litisqe Kumar Jul 09 '15 at 05:47
-
he's got to ask a question properly. – Amit Kumar Ghosh Jul 09 '15 at 05:53
2 Answers
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

- 53,448
- 46
- 161
- 251

- 351
- 3
- 14
-
2this is more kind of comment. Please comment in the comments section. – Amit Kumar Ghosh Jul 09 '15 at 05:46
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
.

- 1
- 1

- 2,512
- 4
- 26
- 40