DatabaseLibrarySDS (.NET Framework) and DatabaseLibraryMDS (.NET 8) are powerful libraries that streamline CRUD operations with SQL Server databases. They provide automatic mapping between class properties and database columns, handle type conversions seamlessly, and significantly reduce the amount of code required for robust data access. Both libraries offer consistent functionality and are conveniently available as NuGet packages for effortless integration. DatabaseLibraryMDS is the exclusive choice for the SQL To CSharp Plus extension in .NET 8 projects and can be installed automatically in the project settings.
- Provides a unified interface for executing SQL Server CRUD operations.
- Supports both synchronous and asynchronous database queries.
- Handles parameterized queries to prevent SQL injection.
- Automatically maps query results to strongly-typed objects using reflection.
- Includes built-in transaction management (begin, commit, rollback).
- Offers flexible methods for retrieving data as lists, single objects, DataTables, DataSets, or JSON.
- Integrates optional event logging for error tracking on Windows systems.
- Implements IDisposable for proper resource cleanup.
- Supports both stored procedures and raw SQL text commands for flexible querying.
- Parameter mapping is automatic from object properties, reducing manual code and errors.
- Handles structured parameters (e.g., table-valued parameters) for advanced SQL Server features.
- Provides overloads for most methods to accommodate different usage scenarios (with/without parameters, generic types, etc.).
- Implements robust error handling with optional event logging for diagnostics.
- Ensures proper resource management with IDisposable and automatic cleanup of connections and commands.
- Designed for .NET 8 and C# 12, leveraging modern language features and async/await patterns.
- Seamlessly integrates with your project’s unit testing framework for reliable and maintainable code.