Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. NPoco

NPoco

Apache-2.0C#5.0.0

A simple micro-ORM for .NET that maps SQL query results directly to POCO objects with minimal configuration.

GitHubGitHub
874 stars309 forks0 contributors

What is NPoco?

NPoco is a simple micro-ORM for .NET that maps SQL query results directly to plain old CLR objects (POCOs) with minimal configuration. It allows developers to write raw SQL queries while automatically handling the mapping between database columns and object properties, reducing boilerplate code. The project is a fork of PetaPoco, based on Schotime's branch, with additional features.

Target Audience

.NET developers who prefer writing raw SQL but want to avoid manual data mapping, and those seeking a lightweight alternative to full-featured ORMs like Entity Framework.

Value Proposition

NPoco offers a straightforward, no-fuss approach to data access by keeping developers close to SQL while automating object mapping. It's faster to set up than heavier ORMs and provides more control than some micro-ORMs, making it ideal for projects where simplicity and performance are priorities.

Overview

Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco

Use Cases

Best For

  • Quickly mapping SQL query results to POCOs without complex configuration
  • Adding lightweight data access to small or medium .NET applications
  • Projects where developers prefer writing raw SQL over query builders
  • Scenarios requiring a simple alternative to Entity Framework or Dapper
  • Legacy projects that need a straightforward ORM with minimal overhead
  • Microservices or APIs where database interactions are simple and direct

Not Ideal For

  • Projects requiring advanced ORM features like lazy loading, change tracking, or automatic schema migrations
  • Teams that prefer LINQ-based query builders over writing and maintaining raw SQL
  • Large enterprise applications needing extensive vendor support, documentation, and frequent updates
  • Scenarios where database interactions are highly complex with many-to-many relationships or inheritance mapping

Pros & Cons

Pros

Automatic POCO Mapping

Automatically maps database columns to POCO properties with case-insensitive matching, requiring no explicit configuration for basic queries, as shown in the README's User class example.

Minimal Configuration

Setup involves just a connection string and POCO definitions, enabling quick database querying without complex mapping files or attributes, reducing initial overhead.

Raw SQL Control

Provides full control over SQL queries, allowing developers to leverage database-specific optimizations and features directly, ideal for performance-critical scenarios.

Lightweight Performance

Designed as a micro-ORM, it reduces runtime overhead and improves execution speed compared to heavier alternatives like Entity Framework, making it efficient for simple data access.

Cons

Limited Advanced Features

Lacks built-in support for common ORM features such as change tracking, lazy loading, or database migrations, which may require manual implementation or third-party tools.

SQL Maintenance Burden

Relies on developers writing and maintaining raw SQL, which can become error-prone and less maintainable in projects with complex queries or evolving schemas.

Documentation Gaps

Documentation is provided via a wiki, which might be less comprehensive or up-to-date than official docs for larger projects, potentially increasing troubleshooting time.

Fork Maintenance Risks

As a fork of PetaPoco, it may have a smaller community and slower update cycle compared to mainstream ORMs, risking long-term support and compatibility issues.

Open Source Alternative To

NPoco is an open-source alternative to the following products:

E
Entity Framework

Entity Framework is an object-relational mapper (ORM) for .NET that enables developers to work with databases using .NET objects.

D
Dapper

Dapper is a micro-ORM (Object Relational Mapper) for .NET that provides high-performance data access with minimal overhead compared to full ORMs.

Frequently Asked Questions

Quick Stats

Stars874
Forks309
Contributors0
Open Issues44
Last commit2 months ago
CreatedSince 2012

Tags

#database#csharp#micro-orm#data-access#dotnet#c-sharp#orm-alternative#sql

Built With

.
.NET
C
C++

Included in

.NET21.2kCore21.2k
Auto-fetched 1 day ago

Related Projects

Entity Framework CoreEntity Framework Core

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

Stars14,637
Forks3,377
Last commit1 day ago
Entity Framework CoreEntity Framework Core

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

Stars14,637
Forks3,377
Last commit1 day ago
SqlSugarSqlSugar

.Net aot ORM SqlServer ORM Mongodb ORM MySql 瀚高 Postgresql ORM DB2 Hana 高斯 Duckdb C# VB.NET Sqlite ORM Oracle ORM Mysql Orm 虚谷数据库 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET9 ORM .NET8 ORM ClickHouse ORM QuestDb ,TDengine ORM,OceanBase ORM,GaussDB ORM,Tidb ORM Object/Relational Mapping

Stars5,796
Forks1,390
Last commit6 days ago
ServiceStack.OrmLiteServiceStack.OrmLite

Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all

Stars5,492
Forks1,617
Last commit25 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub