5

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.

pim
  • 12,019
  • 6
  • 66
  • 69
Beannie
  • 79
  • 1
  • 5

1 Answers1

1

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.

pim
  • 12,019
  • 6
  • 66
  • 69