Skip to content
Advertisement

Tag: asp.net-mvc

Generic repository with Dapper

I’m trying to build a generic repository with Dapper. However, I have some difficulties to implement the CRUD-operations. Here is some code from the repository: As you can see, my delete-method takes a TEntity as parameter which is a parameter of type class. I call my Delete-method from my UserRepository like this: The thing is that I can’t write entity.Id

efficient way to implement paging

Should I use LINQ’s Skip() and Take() method for paging, or implement my own paging with a SQL query? Which is most efficient? Why would I choose one over the other? I’m using SQL Server 2008, ASP.NET MVC and LINQ. Answer Trying to give you a brief answer to your doubt, if you execute the skip(n).take(m) methods on linq (with

Advertisement