davidfowl / TodoApi

Todo application with ASP.NET Core Blazor WASM, Minimal APIs and Authentication
MIT License
2.79k stars 419 forks source link

Use DbContext Add rather than AddAsync method #18

Closed blundell89 closed 2 years ago

blundell89 commented 2 years ago

The EF docs recommend using the non async DbContext<TEntity>.Add method when adding entities (except for special cases). This PR switches from the async method to the sync one.

kevbite commented 1 year ago

I've come across this before and it really screams bad API design from the EF. 😔