Skip to content

LINQ-based, type safe query builder, query executor and results parser into plain C# objects made for PostgreSQL.

License

Notifications You must be signed in to change notification settings

KrystianD/KDPgDriver

Repository files navigation

KDPgDriver

KDPgDriver - LINQ-based, type safe query builder, query executor and results parser into plain C# objects. Uses Npgsql as PostgreSQL connector.

Key Concepts

  • Made specifically for PostgreSQL,
  • Single source of truth - table and column names defined as attributes in POCO model,
  • Stable - almost 200 tests (unit and functional).

Features

  • Support for SELECT (including EXISTS), INSERT, DELETE and UPDATE queries,
  • Support for typed LEFT JOINs,
  • Support for json(b) fields (querying, extracting data from nested models),
  • Implemented some of Postgres functions in type-safe manner,
  • Support for using C# methods of string (StartsWith, Contains, etc) and DateTime properties (Day, Month, etc),
  • Extension methods for easy LIKE, IN and ANY usage,
  • Subqueries support:
    • in WHERE clause of SELECT, DELETE and UPDATE queries,
    • in INSERT query as field value,
  • Support for transactions and batch queries (and batch transaction queries),
  • Support for placing results in custom DTO objects.

Examples

Basic examples

About

LINQ-based, type safe query builder, query executor and results parser into plain C# objects made for PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Languages