Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 4 months ago
JSON representation

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

Awesome Lists containing this project

README

        

NPoco
=====
[![NuGet](https://img.shields.io/nuget/v/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.