-
Notifications
You must be signed in to change notification settings - Fork 97
Async versions
Jon P Smith edited this page Apr 11, 2018
·
2 revisions
Most of the examples use synchronous methods, but there is an ICrudServicesAsync which contains async versions of all of the commands.
- The only command in both
CrudServicesandCrudServicesAsyncthat is synch/async agnostic is theReadManyNoTracked. That method returns anIQueryable<T>, so you can add a synch (e.g..ToList()) or an async (e.g..ToListAsync()) on the end to define whether you want synch or async. - Only synchronous create/update methods are supported in the entity classes. If you are doing anything complex enough to be worth being async you should make it into business logic, which can be run async.