Reflection IT Blog

Benieuwd naar de laatste ontwikkelingen rondom software ontwikkeling en Reflection IT? Onze slimme koppen delen regelmatig hun kennis en ervaring. Zo weet jij wat er speelt!

work tagged Blog posts

Paging in ASP.NET Core MVC and EntityFramework Core

29-Mar-2017 60 Comments

Paging, sorting and filtering are common features in websites. Microsoft has written a tutorial how to implement these features in ASP.NET Core MVC with Entity Framework Core. The described solution works but I found it a bit too primitive. It triggered me to create a more powerful solution. Before you can start using my solution you should first read this tutorial, it explains how you can add Entity Framework Core to an ASP.NET Core MVC application.

Extending my .NET Freelance Network


Sorry Dutch only.

Vanwege mijn brede expertise en de aantrekkende markt krijg ik de laatste tijd veel leuke opdrachten in Nederland en België aangeboden waarop ik regelmatig nee op moet verkopen. Daarbij wordt mij meestal ook gevraagd of ik in mijn netwerk nog andere .NET freelancers ken. Daarom heb ik een netwerk opgezet zodat ik potentiële opdrachtgevers kan doorverwijzen naar een collega.

Via deze blog nodig ik .NET freelancers uit zich gratis en vrijblijvend bij mij aan te melden. Mijn netwerk is alleen voor Microsoft specialisten, hierbij gaat het dus om:

  • Software Architecten
  • Team en Projectleiders
  • Coaches
  • Trainers
  • Ontwerpers
  • Programmeurs (C#, VB.NET, ASP.NET, SQL, XML)
  • DBA’s
  • Web-designers
  • (unit)testers

Aanmelden kan heel eenvoudig via een e-mailtje naar



I have just received mail from Pearson VUE informing me that have passed the Beta Exam 70-528 TS: Microsoft .NET Framework 2.0 - Web-Based Client Development (called 71-528 while it's in Beta). I also received a free Voucher for a next exam, thanks guys.

On Friday I will try the Beta Exam 70-551 UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework. One week later I will try the Beta Exam70-552 UPGRADE: MCAD Skills to MCPD Windows Developer by Using the Microsoft .NET Framework . Wish me luck.

What is an architect?


I just saw the great Sparkle video on Channel9. On of the most funny part was the question 'What is an Architect?'. The anwer from John Gossman was 'It is a fancy title for a programmer' or in other words 'You are old'. I hope you enjoy the movie, I did. I can't wait to play with it.

Microsoft has put my 'Dual List' .NET Magazine article online!


Microsoft has put my Visueel programmeren met .NET: Dual List Control article online. It is published in the .NET Magazine #8 and it is free for Dutch developers.
They didn't publish the sourcecode (yet) but you can download it from my own site. The aricle is in Dutch. You can find an (old) English version of this article here. An even more advanced implementation that also supports Drag & Drop can be found here.



For a long time I thought that I only had to set the Cursor.Current to a WaitCursor before a long running operation, the .NET runtime would reset it back to the Default cursor. Turns out that this is only true when the mouse is moved. Bummer.

// Cursor.Current are automatically reset to Default when the
// mouse is moved and the application is idle!
Cursor.Current = Cursors.WaitCursor;

The solution for this problem is very easy. I created a helper class called WaitCursor which set the Cursor.Current and restores it to the original value when it it disposed.

public sealed class WaitCursor : IDisposable {   &nbsp   &nbsp   &nbsp   &nbsp
   &nbspprivate Cursor _prev;

   &nbsppublic WaitCursor(){
   &nbsp   &nbsp_prev= Cursor.Current;
   &nbsp   &nbspCursor.Current = Cursors.WaitCursor;

   &nbsppublicvoid Dispose(){
   &nbsp   &nbspCursor.Current =_prev;

I create the instance of the WairCursor class inside a using statement. This will automatically call the Dispose() method when it goes out of scope.



Microsoft has invented a new name Micro-ISV, which are software companies that are comprised of only one person. So, I'm a Micro-ISV. Planning to launch my product this year. I hope to succeed.

Dispose Modal WinForm Dialogs


There is a difference in disposing Modal and Non-Modal forms. In a training I gave last week I noticed that even experienced developers didn't know that Modal Dialogs don't dispose automatically, Non-Modal do.

private void buttonShowNonModalForm ( object sender , System.EventArgs e){
   &nbspnew TestForm().Show();

privatevoidbuttonShowModalDialog(objectsender, System.EventArgs e){
   &nbspnew Form2().ShowDialog();

The solution to this problem is very simple by creating the Form instance within a using block. This will dispose the Form when it is closed.

private void buttonShowModalDialog ( object sender , System.EventArgs e){
   &nbspusing(TestForm f =new TestForm()){
   &nbsp   &nbspf.ShowDialog();

An alternative solution uses a try/finnaly. Personally I prefer the previous, it is easier to read and write.

Get in touch

Met dit formulier kunt u informatie over een In-Company of Small-Group training aanvragen. U kunt in het bericht aangeven welke training u wilt, voor hoeveel personen, wanneer deze verzorgd moet worden en op welke locatie. Wij nemen vervolgens contact met u op.

U kunt ons ook bereiken via telefoonnummer +31 (0)493-688810 of per mail