Closed Sarmadjavediqbal closed 1 year ago
Please tell me what am I doing wrong?
@jbogard
You use EF in unit of work and dapper - that is somewhat strange
I would use TransactionScope provider instead with this in mind https://particular.net/blog/transactionscope-and-async-await-be-one-with-the-flow
You use EF in unit of work and dapper - that is somewhat strange
I would use TransactionScope provider instead with this in mind https://particular.net/blog/transactionscope-and-async-await-be-one-with-the-flow
@AdaskoTheBeAst this link does not answer to my problem.
Brother Could you be more specific to the exception I am getting?
Also could you please correct my code???
I don't do Clean Architecture, you're better off asking this on Stack Overflow I think.
I am trying to implement unitOfWork pattern for Transaction but I am getting following error,
error:
{ "messages": [], "source": "Microsoft.Data.SqlClient.SqlCommand+<>c", "exception": "BeginExecuteReader requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.", "errorId": "6d4329bc-c24f-4852-ba88-35caf4b9ad6d", "supportMessage": "Provide the ErrorId 6d4329bc-c24f-4852-ba88-35caf4b9ad6d to the support team for further analysis.", "statusCode": 500 }
Following is my Code:
UnitOfWork and IUnitOfWork;
I have tried methods from following sources but none of them are working;
https://medium.com/swlh/transaction-management-with-mediator-pipelines-in-asp-net-core-39317a19bb8d https://github.com/iammukeshm/EFCoreAndDapper