EntityFramework is an open source object-relational mapping (ORM) framework for ADO.NET. Initially it was a part of .NET Framework, but eventually, it is separated from .NET framework since Entity framework 6. It continues to remain the favorite ORM for .NET developers and is a part of the huge portion of startups and organization.
Entity framework is valuable in three situations;
- Database First: You have already a database, or you need to plan your database in front of different parts of the application and after that create your domain classes from the database.
- Code First: You need to concentrate on your domain classes and after that create the database from your domain classes.
- Model First: You need to design your database schema and afterward create the domain classes and database.
In Entity Framework, programmers execute queries using LINQ, to retrieve and manipulate data. It also provides services like change tracking, identity resolution, lazy loading, and query translation so that programmers can concentrate on their application-particular business logic instead of data access fundamentals.
There are a lot of libraries available which can enhance, extend, and improve the functionality of Entity Framework, e.g., EntityFramework is reputed to be very slow when saving multiple entities. The performance issue is mainly due to the DetectChanges method and the number of database round-trip. Z.EntityFramework.Extensions is a library that dramatically improves the performance because it only requires a few database round-trip.
In this article, we will discuss the top 10 libraries, or you can say the most useful libraries which are used in 2017.
1. EntityFramework Plus (EF6) | Full Version By ZZZ Projects
EntityFramework Plus extend and overcome Entity Framework Limitations with Must-Have Features such as:
- Batch Delete
- Batch Update
- LINQ Dynamic
- Query Cache
- Query Deferred
- Query Filter
- Query Future
- Query IncludeFilter
- Query IncludeOptimized
For further details, you can visit http://entityframework-plus.net/
2. LinqKit By bigsan
LINQKit is a free library providing a set of extensions for LINQ to SQL and EntityFramework power users. It comprises the following:
- An extensible implementation of AsExpandable()
- A public expression visitor base class (ExpressionVisitor)
- Linq.Expr and Linq.Func shortcut methods
With LINQKit, you can:
- Plug expressions into EntitySets and EntityCollections
- Use expression variables in subqueries
- · Combine expressions (have one expression call another)
- Dynamically build predicates
- Leverage AsExpandable to add your extensions.
For further details, you can visit https://github.com/scottksmith95/LINQKit
3. Z.EntityFramework.Extensions By ZZZ Projects
- Z.EntityFrameworkExtensions is a library that dramatically improves EF performances by using bulk and batch operations.
- People using this library often report performance enhancement by 50x times and more!
- The library is installed through NuGet. Extension methods are added automatically to your DbContext.
- It easy to use, easy to customize.
For further details, you can visit http://entityframework-extensions.net/
4. IdentityServer4.EntityFramework By identity
IdentityServer4.EntityFramework is a persistence layer for IdentityServer 4 configuration data that uses EntityFramework as its database abstraction.
5. EntityFramework Profiler By ayende
EntityFramework Profiler is a real-time visual debugger allowing a development team to gain valuable insight and perspective into their usage of EntityFramework.
The product is architected with input coming from many top industry leaders within the OR/M community. Alerts are presented in a concise code-review manner indicating patterns of misuse by your application.
To streamline your efforts to correct the misuse, we provide links to the problematic code section that triggered the alert.
6. RefactorThis.GraphDiff By ZZZ Projects
DbContext extension methods for Entity Framework Code First that allow you to save an entire detached Model/Entity, with child Entities and Lists, to the database without writing the code to do it.
GraphDiff allows automatic update of a graph of detached entities using Entity Framework v6+. If you have ever felt the pain of updating a detached graph with one or more nested collections, then this is for you.
For further details, you can visit https://github.com/zzzprojects/GraphDiff
7. EntityFramework.DynamicFilters By ZZZ Projects
Provides global scoped filters for Entity Framework with dynamic filter parameters that are evaluated at query execution.
- The filters are automatically applied to every query and can be used to support use cases such as Multi-Tenancy, Soft Deletes, Active/Inactive, etc.
- Filters can be created using boolean LINQ expressions and also support the Contains() operator.
- Access to DynamicFilters is done via extension methods in the EntityFramework.DynamicFilters namespace on the DbContext and DbModelBuilder classes.
For further details, you can visit https://github.com/zzzprojects/EntityFramework.DynamicFilters
8. EntityFramework.Testing By scott xu
EntityFramework.Testing provides an implementation of DbAsyncQueryProvider that can be used when testing a component that uses async queries with EntityFramework. All the following mocked DbSet operations work as expected:
9. EntityFramework.Patterns By fabrice
EntityFramework.Patterns provides different patterns to be used with Entity Framework 6.0 or later and has implemented the following patterns:
- Generic Repository
- Unit of Work
- Repository Decorator
- Auditable Entity
- Archivable Entity
10. Audit.EntityFramework By thepirat000
Audit.EntityFramework automatically generates Audit Logs for EntityFramework's CRUD operations. It provides the infrastructure to log interactions with the EF DbContext. It can record detailed information about CRUD operations in your database.