sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics (you need a .edu or a .ac email address), not free for commercial use. Obtain your licence from
https://www.reversepoco.co.uk/
Other
711 stars 227 forks source link

Check if connection is already open for stored procedure calls #845

Open sjh37 opened 4 months ago

sjh37 commented 4 months ago

Need to add

if(Database.Connection.State != ConnectionState.Open)

before the line

    DbInterception.Dispatch.Connection.Open(Database.Connection, new DbInterceptionContext());

As .Open can throw if the connection is already open