MvcPaging icon indicating copy to clipboard operation
MvcPaging copied to clipboard

Split into 2 assemblies

Open wis3guy opened this issue 11 years ago • 4 comments

I really enjoy your library. So much even, that i now have several of my backend layers/api's returning IPagedList<T>. Using the IQueryable<T> extensions, directly within my NHibernate's Linq queries, is also a very smooth experience.

What i really dislike though is the fact that, in order to use the IPagedList<T> throughout my application layers (and thus projects) requires a dependency on System.Web and on MVC. Given i also use that same data access layer in f.ex. WPF apps, means that i get saddled up with needless dependencies.

I would suggest breaking the current project up into 2 separate projects/assemblies/nuget packages. One that holds the abstractions and related extension methods -- which i would use in my non-MVC layers -- , and one that deals with MVC specific things -- which i would use in my UI layer only.

Is this something you would consider for this library, or should i resort to a fork? Dow you want a pull request for this?

wis3guy avatar Sep 26 '14 10:09 wis3guy

I can really imagine why you would want this. A pull request would be great ;).

martijnboland avatar Sep 28 '14 20:09 martijnboland

Or maybe you could use the PagedList library (https://github.com/TroyGoode/PagedList) and use that one together with MvcPaging? The pager itself doesn't have a dependency on IPagedList<T> at all.

martijnboland avatar Sep 28 '14 20:09 martijnboland

Had a quick look at that library but it looks like it offers the exact same functionality as MvcPaging, right? So perhaps that would then be a better/simpler option ... Thank you for the pointer anyway.

wis3guy avatar Oct 01 '14 07:10 wis3guy

I think the main difference is that their HTML helper requires the use of IPagedList where our helper doesn't require anything specific (as I remember correctly).

martijnboland avatar Oct 01 '14 08:10 martijnboland