You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0a35cdf
Browse filesBrowse the repository at this point in the historyBrowse files
When a business transaction is completed, all the these updates are sent as one
14
-
big unit of work to be persisted in a database in one go so as to minimize database trips.
14
+
When a business transaction is completed, all the the updates are sent as one big unit of work to be persisted
15
+
in one go to minimize database round-trips.
16
+
17
+
## Explanation
18
+
Real world example
19
+
20
+
> We have a database containing student information. Administrators all over the country are constantly updating this information and it causes high load on the database server. To make the load more manageable we apply to Unit of Work pattern to send many small updates in batches.
21
+
22
+
In plain words
23
+
24
+
> Unit of Work merges many small database updates in single batch to optimize the number of round-trips.
> Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
29
+
30
+
**Programmatic Example**
31
+
32
+
Here's the `Student` entity that is being persisted to the database.
0 commit comments