Does anyone know if it's possible to tell dapper to append with (nolock)
when using connection.GetList<TView>()
?
I am using this as the R from my CQRS model and it works well but I'm concerned now we're doing a bit more heavy reading that it will start locking out tables. I'd rather not add transactions into the mix if possible.
dapper is really just a set of extension methods plunked on top of ADO.NET. It's meant to be a generic abstraction allowing it to interop with (m)any RDMS's.
Since with (nolock)
is SQL Server syntax, it wouldn't make a ton of sense for it to be baked into any of the methods, extension lib or otherwise.
Moreover, the dapper-extensions package is meant to help with the simple task of CRUD operations. If the complexity goes beyond these operations, it's time for .Query()
and some custom SQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With