
Using Add
or AddAsync
in Entity Framework Core can be a little confusing, especially for those new to working with databases and ORMs (Object-Relational Mappers). In this blog post, we’ll take a look at the difference between Add and AddAsync and when you might want to use one over the other.
First, let’s define what these two methods do. Add is a method on the DbSet class in Entity Framework Core that is used to add a new entity to the database. It is a synchronous method, meaning that it will block the calling thread until the operation is complete. AddAsync, on the other hand, is an asynchronous version of Add that allows you to add a new entity to the database without blocking the calling thread.
So, when should you use Add versus AddAsync? In general, an async method should use be used whenever you are working with an application that relies on asynchronous programming, such as a web application or a mobile app. This is because an async implementation allows your application to remain responsive while the database operation is being performed.
It’s also worth noting that (here) AddAsync is not always faster than Add. In fact, in some cases, AddAsync may actually be slower due to the overhead of starting and managing the asynchronous task. After all, the state machine costs performance in principle. However, the advantages outweigh the disadvantages in almost all cases.
Under the hood of Add and AddAsync
The special feature of Add or AddAsync is that there are additional features that are not obvious at first glance.
The fact that a method is offered as Async implies that a network call is made. But this is not the case with Add, is it? Yes, a network call can be made, namely when using certain value generators. The docs of AddAsync(Object, CancellationToken) Method
says:
This method is async only to allow special value generators, such as the one used by ‘Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo’, to access the database asynchronously. For all other cases the non async method should be used.
In summary, the use of Async in this case is only recommended if the feature of value generators
, which causes database network roundtips, is actively used. For all other cases, the non-asynchronous way via Add should be used, as recommended by the documentation (current status).
In case of doubt, however, AddAsync can be used here as well without any problems. Even if the feature of Value Generators is not used it is not worse than vice versa.
Related articles

Mar 10, 2026 · 15 min read
.NET NuGet Trusted Publishing with GitHub Actions
Publishing NuGet packages has traditionally required one uncomfortable compromise: a long-lived API key had to exist somewhere in the …

Mar 09, 2026 · 7 min read
C# 15 Unions: Unions are finally in .NET
After many years of workarounds, design discussions and library-level substitutes, unions are finally becoming a first-class part of C#. The …

Mar 02, 2026 · 19 min read
Unio: High-Performance Discriminated Unions for C#
C# is a powerful language, but there is one road it has not yet fully paved: native discriminated union types. Developers have been working …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

Comments