Skip to content

Commit c01648a

Browse files
authored
editorial
Updated the language for clarity and consistency in the accessing-data documentation.
1 parent 9150b63 commit c01648a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

nservicebus/handlers/accessing-data.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@ related:
1515
- persistence/azure-table
1616
---
1717

18-
In most cases, [handlers](/nservicebus/handlers/) are used to modify the internal state of an application based on the content of a received message. In any system, it is critical to ensure the state change happens exactly once. In a messaging system, this can be challenging as exactly-once delivery is not guaranteed by many queuing technologies. NServiceBus provides several strategies to mitigate the risk of a handler leaving the application on an inconsistent state.
18+
In most cases, [handlers](/nservicebus/handlers/) are used to modify the internal state of an application based on the content of a received message. In any system, it is critical to ensure the state change happens exactly once. In a messaging system, this can be challenging as exactly-once delivery is not guaranteed by many queuing technologies. NServiceBus provides several strategies to mitigate the risk of a handler leaving the application in an inconsistent state.
1919

2020
Accessing the application state can be achieved in a number of ways and is not enforced or restricted by using NServiceBus.
2121

22-
The section below provides guidance on several ways of accessing the application state by using the same data context as NServiceBus uses internally.
22+
The section below outlines several ways to access the application state using the same data context NServiceBus use internally.
2323

2424
partial: transactionscope
2525

2626
### Object/relational mappers
2727

28-
When using an object/relational mapper (ORM) like [Entity Framework](https://en.wikipedia.org/wiki/Entity_Framework) for data access, there is the ability to either inject the data context object via dependency injection or create a data context on the fly and reuse the connection.
28+
When using an object/relational mapper (ORM) like [Entity Framework](https://en.wikipedia.org/wiki/Entity_Framework) for data access, the two primary options are:
29+
30+
1. Create a data context on the fly and reuse the connection
31+
2. Inject the data context object via dependency injection
2932

3033
Creating a data context on the fly means that any other handler will work disconnected from that data context. This is a fairly simple approach, but it is not recommended when the same message is processed by multiple handlers.
3134

32-
If multiple handlers processing a single message is a requirement, then it is recommended to inject the data context of an ORM via dependency injection. More information can be found in the SQL persistence documentation about [accessing data](/persistence/sql/accessing-data.md).
35+
If multiple handlers processing a single message is required, injecting the data context object via dependency injection is recommended. More information can be found in the SQL persistence documentation about [accessing data](/persistence/sql/accessing-data.md).
3336

3437
### Synchronized storage session
3538

0 commit comments

Comments
 (0)