Skip to content

novacole/NovaORM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NovaORM

A Simple ORM written in C#. NovaORM is a thin wrapper over ADO.NET's SqlClient, designed to eliminate most of the boilerplate associated with ADO.net.

Example

Let's say you have a DB table and POCO model Person


class Person 
{
        [IsPrimaryKey]
        public int ID { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        
} 

With NovaORM you could do the following:

            var db = new NovA("ConnectionString");
            var person = db.GetList<Person>().Find(x => x.FirstName == "Henry");
            person.FirstName = "Hendrick";
            db.UpdateWithValues<Person>(person);
            person = db.GetList<Person>().Find(x => x.FirstName == "Hendrick");
//...

Or


            var db = new NovA("ConnectionString");
            var person = new Person() { FirstName = "Henry", LastName = "Franklin" };
            db.InsertWithValues(person);
            var people = db.GetList<Person>();
//...

Releases

No releases published

Packages

No packages published

Languages