We use Entity Framework 5, but have a requirement to ALSO use a normal database connection from the application for some custom SQL we need to perform.
So, I am creating
In my case I just needed to execute an update statement so I used the following construct
_db.Database.ExecuteSqlCommand($"update ChiusureTurni set esportato = 1 where idChiusuraTurni = {idChiusura}");
where _db is my db context in this case I took advatage of transaction management