I was wondering what people thought about the decision to support Entity Framework over LINQ-to-SQL? I have an application I'm developing originally in LINQ-to-SQL. I found it the perfect solution for our application.
While attempting to port to Entity Framework I was surprised how rough it was. IMHO, not even close to being ready for prime time. No lazy loading, no POCOs, horrible dependency on inheritance. I found it largely unusable in my case and instead decided to stick with LINQ-to-SQL until somehow this Entity Framework can get more polished.
Anyone else have similar experience with it?
Conclusion. EF should be considered a great ORM framework which allows faster development, easier and quicker operations to the DB, as long as you are careful and know how it works in order to avoid certain mistakes and create performance problems.
The Entity Framework enables developers to work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern themselves with the underlying database tables and columns where this data is stored.
One of the biggest reasons not to use Entity Framework Core is that your application needs the fastest possible data access. Some applications do a lot of heavy data operations with very high-performance demands, but usually business applications don't have that high of a performance demand.
Entity Framework is an ORM tools. It is good for data accessing. It provides lot of benefits. But for the development of enterprise applications we should consider its performance.
API WCF Web API Web Service InterviewShow sub menu Interview General Entity Framework Advantages and Disadvantages of Entity Framework by Rashedul AlamSeptember 5, 2013September 28, 2020 Entity Frameworkis an ORM tools. It is good for data accessing. It provides lot of benefits.
Reply Lakshmansays: November 9, 2019 at 11:00 pm nice points Reply Akansha Yadavsays: April 29, 2020 at 1:37 pm hey, If you define your navigation property virtual, Entity Framework will at runtime create a new class (dynamic proxy) derived from your class and uses it instead of your original class.
This new dynamically created class contains logic to load the navigation property when accessed for the first time. This is referred to as “lazy loading”. It enables Entity Framework to avoid loading an entire tree of dependent objects which are not needed from the database. Reply
That is pretty much my view. See my previous reply here. This other question wasn't specifically about the problems in EF, but yes: it has a fair few glitches. For example (in addition to your existing options):
Expression.Invoke
(re-using expression trees to form a more complex expression)LINQ-to-SQL handles both just fine...
I think it depends on the application platform. When my team set out to create a new ASP.net app, we wanted to go with EF... but after playing around with it for a bit, we went with Linq-To-SQL. In a web environment, managing the L2S datacontext was a lot easier. Also, we liked that L2S entities expose the original Id field (e.g. EmployeeTypeId), unlike EF, which would only have the child entity exposed. In a web environment, a lot of times you really don't need that extra information, the Id is enough because it is a reference to a dropdown list that has already been loaded (and probably cached).
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