To get the prototype for a project up and running as quickly as possible, I used LINQ to SQL for data persistence.
Now the project is more mature and I'm running into concurrency limitations with LINQ to SQL. Since its not a true ORM, nor was it meant for enterprise use, I'd like to replace all the LINQ to SQL work with Entity Framework persistence.
What's involved in this? Can any of my LINQ to SQL work be retooled for EF? Am I going to have to start over with EF from scratch? Where do I start? Any helpful links or advice?
Entity framework is a great ORM shipped by Microsoft which allow you to query and modify RDBMS like SQL Server, Oracle, DB2 and MySQL etc. by using LINQ syntax. Today, EF is widely used by each and every . NET application to query to database.
First off, if you're starting a new project, use Entity Framework ("EF") instead of Linq to SQL because it now generates far better SQL (more like Linq to SQL does) and is easier to maintain ("L2S").
Entity Framework is an object-relational mapping (ORM) framework for connecting C# code to external databases, usually SQL Server. LINQ is a query language embedded into C# and a set of extension methods in order to make it useful.
Short answer: Neither, because those are uncomparable. But if you mean Linq To SQL vs Entity Framework, then Entity Framework is better. Both, Linq to SQL and Entity Framework are data access frameworks and both supports Linq for querying data.
Many people are doing the same conversion. There is a template that you can use to do the conversion here http://blogs.msdn.com/b/efdesign/archive/2009/08/13/linq-to-sql-to-entity-framework-conversion-template.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With