Databases
Installation
SKILL.md
Databases
Instructions
When helping users work with database access in C#, follow these guidelines:
-
Library Selection:
- DuckDB: Use
System.Data.Odbcwith DSN=DuckDB - PostgreSQL: Use
Npgsqlfor direct access (recommended) or ODBC for legacy - MySQL: Use
MySql.Datafor native access or ODBC - SQL Server/X3/Sage1000: Use
System.Data.Odbc - Exportmaster (DBISAM): Use
System.Data.Odbc
- DuckDB: Use
-
Parameter Styles:
- ODBC connections:
?placeholders - Native MySQL:
@parameterstyle - Native PostgreSQL:
$1, $2, $3positional parameters
- ODBC connections:
-
ExecuteAndMap Pattern: Use the ServiceLib ODBC wrapper with lambda mappers for type-safe result mapping