What is the meaning of the term that "Linq to SQL" has One to one Mapping with data base and how its differ from ADO.net Entity Framework 4.0. Please Explain Clearly with Example...
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Oct 30, 2013, 1:41 AM
LINQ to SQL is a component of .NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects.
Linq-To-Sql - use this framework if you plan on editing a one-to-one relationship of your data in your page. Meaning you don't plan on combining data from more than one table in any one view or page.
Entity Framework is an Object Relational Mapper (ORM), generates business objects and entities according to the database tables and provides the mechanism for CRUD.
Entity Framework - use this framework if you plan on combining data from more than one table in your view or page.
With the Entity Framework you are able to combine the data together to present to the form [page], and then when you submitted form, EF will know how to update ALL the data from the various tables.
Jignesh TrivediPosted Oct 30, 2013, 12:34 AM
One to one mapping means In LINQ to SQL, all tables are define as classes and all columns are defined as class 's properties.
Entity framework support SQL server and other data base like Oracle, DB2, MySQL..
In LINQ to SQL there is one to one mapping with database object whereas in entity framework you can map your entity with multiple database table.
EF support mutiple modeling techniques like code first, model first and database first.
Please refer
http://jinaldesai.net/linq-to-sql-vs-entity-framework/
hope this will help you.