https://github.com/schotime/NPoco
Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
https://github.com/schotime/NPoco
c-sharp database micro-orm npoco petapoco
Last synced: 30 days ago
JSON representation
Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
- Host: GitHub
- URL: https://github.com/schotime/NPoco
- Owner: schotime
- License: apache-2.0
- Created: 2012-04-19T23:44:58.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2024-01-22T21:45:08.000Z (about 1 year ago)
- Last Synced: 2025-02-15T09:47:37.453Z (about 2 months ago)
- Topics: c-sharp, database, micro-orm, npoco, petapoco
- Language: C#
- Homepage:
- Size: 2.73 MB
- Stars: 851
- Watchers: 98
- Forks: 302
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - NPoco - Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco (C# #)
- awesome-dotnet-core - NPoco - Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco. (Frameworks, Libraries and Tools / ORM)
- awesome-dotnet-core - NPoco - 简单的microORM,可将查询结果映射到POCO对象。项目基于Schotime的PetaPoco。 (框架, 库和工具 / 对象关系映射ORM)
- fucking-awesome-dotnet-core - NPoco - Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco. (Frameworks, Libraries and Tools / ORM)
- awesome-dotnet-core - NPoco - Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco. (Frameworks, Libraries and Tools / ORM)
README
NPoco
=====
[](https://www.nuget.org/packages/NPoco)Welcome to the NPoco! NPoco is a fork of PetaPoco based on Schotime's branch with a handful of extra features.
### Getting Started: Your first query
```csharp
public class User
{
public int UserId { get;set; }
public string Email { get;set; }
}IDatabase db = new Database("connStringName");
List users = db.Fetch("select userId, email from users");
```This works by mapping the column names to the property names on the ``User`` object. This is a case-insensitive match.
There is no mapping setup needed for this (query only) scenario.Checkout the [Wiki](https://github.com/schotime/NPoco/wiki/Home) for more documentation.