I have product that already uses ADO.Net to access SQL Server and I'm using Entity Framework Core for some new functionality. The problem I'm having is I have some operations that must be done in a single transaction and the first few actions are implemented through ADO.Net and I need add an extra action using Entity Framework so I need to pass the transaction to the DBContext.
When I need to use an existing connection I can do:
var dbc = new MyDBContext(optionsBuilder.UseSqlServer(connection).Options)
Is there something similar where I pass in a transaction instead of a connection? Should I be doing this in a completely different way?