.NET Object Relational Mapping Tool
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
DatabaseObjects 3.5.csproj



Database Support

  • SQL Server
  • MySQL
  • SQLite
  • HyperSQL
  • Microsoft Access
  • Pervasive

Environment Support

  • Windows
  • iOS via MonoTouch
  • Android via MonoDroid
  • OSX / Linux via Mono


The DatabaseObjects library is .NET object relational mapping tool that contains a large set of powerful classes that interface to the underlying database system. Classes and properties in the business layer / model are marked with attributes (or functions overridden) in order to indicate the table and field mappings to the database. The library is simple, powerful and easy to learn. There are no external files to setup - everything is setup using standard object-oriented techniques. It is light-weight, flexible and provides facilities for ensuring maximum performance. It is also under active development and requests for changes are always welcome.


Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SQL Support

The library also supports other database commands for creating / altering tables, indexes, views and specifying table joins, arithmetic expressions, aggregates, grouping, ordering, unions and support for all common data types and more. All commands are database agnostic.


A series of tutorial videos are available [here].(http://www.youtube.com/user/80twix/)


All documentation and other information is available on the website www.hisystems.com.au/databaseobjects


Below is a really simple example of what the library can do. This is really just a taste, see the demo project or the unit test project for more advanced examples.

namespace Northwind.Model
	public class Northwind
		public Suppliers Suppliers { get; private set; }

		public Northwind()
			var database = new DatabaseObjects.MicrosoftSQLServerDatabase("localhost", "Northwind");
			this.Suppliers = new Suppliers(database);

	[DatabaseObjects.DistinctField("SupplierID", eAutomaticAssignment: DatabaseObjects.SQL.FieldValueAutoAssignmentType.AutoIncrement)]
	public class Suppliers : DatabaseObjects.Generic.DatabaseObjectsEnumerable<Supplier>
		internal Suppliers(DatabaseObjects.Database database)
			: base(database)

	public class Supplier : DatabaseObjects.DatabaseObject
		public string Name { get; set; }

		public string ContactName { get; set; }

		internal Supplier(Suppliers suppliers)
			: base(suppliers)

namespace Northwind.Executable
	using Model;

	public class Program
		public static void Main(string[] args)
			var model = new Northwind();

			foreach (Supplier supplier in model.Suppliers)

Demo Project

The demonstration project is available in a separate repository on Github here. It includes a number of examples on how to utilise the library. To run the demo project in conjunction with the library it must be located in same directory as the library.

For example:

/DatabaseObjects /DatabaseObjects.Demo

Unit Test Project

The unit test project is available in a separate repository on Github here. It is also a good resource for examples on how to utilise the library. To run the unit tests project in conjunction with the library it must be located in the same directory as the library.

For example:

/DatabaseObjects /DatabaseObjects.UnitTests