Blazor + Syncfusion + Dapper

Any sufficiently advanced technology is indistinguishable from magic
Arthur C Clarke

Introduction

Why am I writing this? And why Blazor, Syncfusion and Dapper?

The trigger that prompted me to start writing was that although I could find a reasonable number of online resources for Blazor, Syncfusion and Dapper individually, I failed to find any that combined all three. The other minor frustration was that a lot of examples were relatively trivial. These articles are therefore intended, principally, to be an aide-memoire for myself, but hopefully others might also benefit.

I have a background in accountancy and specifying accounting software, together with around ten years hands-on programming in Microsoft Access and VBA, with a glancing knowledge of Microsoft SQL. When it comes to C# programming I am a complete novice.

Why Blazor?

More as an intellectual exercise than anything else I thought I would attempt to get to grips with C# (C-Sharp). After watching several hours of YouTube videos about C# it became obvious that whilst they were helpful an actual physical book on the subject was what I needed. After one false start I settled on 'C# 8.0 and .Net Core 3.0' by Mark J Price and diligently started to read it and complete the examples. This is no criticism of this book, but the one frustration I found was that all the examples were console applications (at least as far as I got - Chapter 6). I wanted examples of programs with a graphical user interface that stored input and read data from a database; I also decided that to learn properly I would need to write something from scratch rather than only following examples (good as they were.)

I mentioned that I have some experience of Microsoft Access. One of its strengths is that is really easy to start to create applications with a decent user interface and has an inbuilt database. One of the weaknesses is that despite a couple of failed attempts at making it 'web-enabled' by Microsoft it remains essentially a desktop application. During the time I have been developing Access systems more and more commercial and public sector users have been demanding 'web-based' applications. (I have more or less given up the argument as to why they want this and have accepted the mantra that 'the customer is always right' - even if I disagree!) Hence my interest in web application design tools, C# and ASP.Net. Whilst stumbling around the maze of how to get started with these tools I came across Blazor. If I wanted to test drive my extremely limited knowledge of C#, and despite the additional requirements of knowing some HTML and CSS, perhaps Blazor would provide a route. So Blazor it is.

Why Syncfusion?

This one is pretty easy to answer. When developing software it is very helpful to have access to 'controls', such as datagrids, combo boxes, etc. without the need to rely on those supplied as part of the language or to write them oneself - particularly if one is only getting started. There are a number of third party Blazor control suppliers, but for my purposes Syncfusion stood out simply because for an individual there is a free 'community' edition. The 'community' edition is identical to the commercial version, but is limited to individuals and companies with an annual gross revenue of $1 million USD and 5 or fewer developers. From my experience so far, support via the community forum is excellent. The link to the Syncfusion community edition download and licence page is shown below. There are a couple of hoops to jump through, but nothing that should deter the genuine individual developer.

https://www.syncfusion.com/products/communitylicense

Why Dapper?

In my trawls though YouTube videos about C# programming I came across a series by Tim Corey (IamTimCorey). In several of those videos he describes the default database connection technology of Entity Framework as a 'black box' over which the programmer has little control, and, as an alternative, is a strong advocate of Dapper . The use of Dapper also suits me personally as some of the 'programming' is moved from the C# environment (about which I know nothing) to SQL (about which I know just a little).