Using SQL Anywhere (or any ODBC source) with dotnet Core

ODBC is back.

It was gone from dotnetcore because the brief is multi-platform, and ODBC is a Windows thing.

But it seems that now it's also a Unix thing. More than that, apparently it's the dominant way to connect to databases in the Unix world. Stranger things have been seen in the skies, but not by reliable witnesses. At any rate, as a result, ODBC has therefore returned in dotnetcore 2.x and you can therefore connect to anything for which you can get an ODBC driver.

This includes SQL Anywhere.

This does nothing for EF Core. There's no EF Core ODBC provider. 

That leaves Dapper, which has disadvantages compared to EF but has considerable merits of its own.

I had no problem using Dapper over the SQL Anywhere ODBC driver. I had to write matched DTO classes and queries but that's par for the Dapper course.

No Comments