-
-
Save dcomartin/3cd802a2e3fc7b5f19c9b84779d38052 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FulfillOrder | |
| { | |
| private readonly DbContext _dbContext; | |
| public FulfillOrder(DbContext dbContext) | |
| { | |
| _dbContext = dbContext; | |
| } | |
| public async Task Handle(int orderId) | |
| { | |
| var order = await _dbContext.Orders.FindAsync(orderId); | |
| order.Status = OrderStatus.Fulfilled; | |
| await _dbContext.SaveChangesAsync(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment