urfnet / URF.Core

Unit of Work & Repositories Framework - .NET Core, NET Standard, Entity Framework Core. 100% extensible & lightweight.
https://github.com/urfnet
MIT License
309 stars 62 forks source link

Why there is no async Insert and update methods #55

Closed AJMalik007 closed 5 years ago

AJMalik007 commented 5 years ago

I am trying to use this framework but when I look into it I have found many async methods but not insert and update my question is that why there is no async insert and update method is there is any logic behind it

tonysneed commented 5 years ago

Insert and update do not touch the database, there is therefore no need for async on those methods — only on saving changes. It may be counter intuitive, but for EF these methods only mark the entity as Added or Modified. No changes are persisted until they are saved to the database in an atomic transaction.