phnx47 / dapper-repositories

CRUD for Dapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not safely call ReadOnlyDapperRepository.Dispose multiple times

terrykyee opened this issue · comments

AutoFac expects classes to be able to be disposed of multiple times, so using DapperRepository with AutoFac causes NullReferenceExceptions when AutoFac goes to dispose of objects. There should be a protection around the call to Connect.Dispose to check for a null Connection to protect against this.

@harshitgindra Thank you!

Published in 1.16.1