Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.95 KB

README.md

File metadata and controls

19 lines (13 loc) · 1.95 KB

This is a WPF reboot of Zinger, with some other project types considered: a command-line tool, a containerized Blazor app, and yet other stuff. The purpose is to be a lightweight cross-platform SQL IDE for generating C# result classes from queries. So for example if you write a query like this -- assuming it's a valid query in a valid connection:

SELECT * FROM [Whatever];

You'll get a C# class that maps to the columns of [Whatever] -- along with the results. For example:

image

This lets you write Dapper code like this:

var results = await cn.QueryAsync<Whatever>("SELECT * FROM [Whatever]");

You now have type-safe access to Whatever using Dapper, without creating the Whatever class by hand.

Why

There are capable SQL IDEs out there such as SSMS, DataGrip, and MySql Workbench. The one thing these clients don't do (as far as I know, maybe there are extensions out there) is generate C# wrapper classes around SQL results. This is really handy when writing queries for Dapper. To get the benefit of Dapper, you need C# result classes that map to your query columns -- assuming you don't want to use dynamic. That's what Zinger does -- generate those result classes from queries.