Closed markgould closed 7 years ago
@markgould when using the outbox you need to ensure that the DB transaction is set on the entity context. Take a look at this one: https://docs.particular.net/samples/sqltransport-sqlpersistence/#receiver-project-accessing-the-ambient-database-details-entityframework-persisting-data. It should be helpful.
That worked perfectly! I must have missed seeing that. Thanks!
Using code very similar to this https://docs.particular.net/samples/entity-framework/?
The only difference is I'm not using the OnSaveChanges line as that isn't there with this persistence. I'm calling SaveChangesAsync in my handler instead.
This is the exception: System.Data.Entity.Core.EntityException: An error occurred while starting a transaction on the provider connection. See the inner exception for details. ---> System.InvalidOperationException: SqlConnection does not support parallel transactions.
This works fine when not using Outbox (dtc enabled)
Is there something I should be doing differently?
StackTrace.txt