Giter Site home page Giter Site logo

kouweizhong / dbentry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lifeng-liang/dbentry

0.0 1.0 0.0 2.86 MB

DbEntry.Net (Leafing Framework) is a lightweight, high performance ORM compnent for .Net.

Batchfile 0.05% Shell 0.05% C# 99.81% HTML 0.05% CSS 0.03%

dbentry's Introduction

DbEntry.Net (Leafing Framework)

DbEntry.Net (Leafing Framework) is a lightweight, high performance ORM compnent for .Net 4.x. It has clearly and easily programing interface. It based on ADO.NET, and supported C#, Visual Basic, ASP.NET etc. It also provide DbEntryDataSource for ASP.NET 2.0 and a Rails style MVC framework and a simple IoC framework.

The samples of the release package all TESTED on Sql Server 2005 Express, Sql Server 2008, MySql 5.0, SQLite 3, Access 2003, Firebird 2.1.0, PostgreSQL 8.3.3 and Oracle 10g express. Features:

  • Linq support
  • FluentInterface query syntax
  • RoR ActiveRecord style syntax
  • Ambient transaction
  • Dynamic object
  • Partial update
  • 1:1 1:Many Many:Many relations
  • Auto create table
  • Anti sql injection
  • Multiple data source
  • Object validation
  • Paged selector and collection
  • Nullable support
  • DbEntryDataSource
  • ASP.NET 2.0 Membership support
  • Built-in Cache Support
  • Ruby On Rails style MVC framework
  • Simple IoC framework
  • High performance, almost same as using ADO.NET directly
  • Lightwight, the binary file only about 360KB

First sight:

public class User : DbObjectModel<User>
{
	public string Name { get; set; }
	public int Age { get; set; }
	public bool Actived { get; set; }
	public DateTime Birthday { get; set; }
}

static void Main()
{
	// Create
	var u = new User { Name = "tom", Age = 18, Actived = true, Birthday = DateTime.Now };
	u.Save();
	// Read
	var u1 = User.FindById(u.Id);
	// Update
	u1.Name = "jerry";
	u1.Save();
	// Delete
	u1.Delete();
	// Query
	var ids = from p in User.Table where p.Age > 15 select new {p.Id};
	var l1 = from p in User.Table where p.Age > 15 && p.Actived select p;
	var l2 = User.Find(p => p.Age > 15 && p.Actived); // another style of linq
	var l3 = User.FindBySql("Select * From [User] Where [Age] > 15 And [Actived] = true");
}

Documentation

Links

For MySql, SQLite and Firebird, please install the .net driver first, to unpack 7z archieve, please install 7-Zip:

Examples:

My Homepage, Blog(Chinese) and email:

Other resources:

Donate 捐款:

  • Details 细节
  • Donate ways 捐款方式:
    • 支付宝: lifeng.liang(at)gmail.com
    • Paypal: lifeng.liang(at)gmail.com
    • Bitcoin: 16ypFeJGaqyQywu9ra1AQw6UaNWP4RoPBf

dbentry's People

Contributors

lifeng-liang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.