Lightweight object relational mapping (ORM) in C#
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
DB
Documentation
OsamesMicroOrm
Reflexions
SampleDbEntities
TestOsamesMicroOrm
TestOsamesMicroOrmMsSql
TestOsamesMicroOrmSqlite
Tools
.gitignore
OsamesMicroOrm.runsettings
OsamesMicroOrm.sln
README.md

README.md

Synopsis

OSAMES ORM is a C# lightweight ORM based on ADO.NET.

It's developed with .NET 4.6.1. We are working on building it with Mono and .NET Core 1 too (not usable for now).

Code Example

Mapping:

<orm:MappingObject property="IdCustomer" column="CustomerId"/>

Template:

<orm:Select name="BaseReadWhere">SELECT {0} FROM {1} WHERE {2} = {3}</orm:Select>

C# code:

_config = ConfigurationLoader.Instance;
Customer customer = DbToolsSelects.SelectSingle<Customer>(new List<string> { "IdCustomer", "FirstName", "LastName" }, "BaseReadWhere",
    new List<string> { "City", "#" }, new List<object> { "Paris" }, _transaction);

Motivation

This lightweight ORM aims at:

  • having a maintainable SQL templates list and simple database to object mapping XML definition,
  • allowing to quickly switch to another provider thanks to ADO.NET API
  • providing robustness against connection pool starvation

Installation

Compile the DLL and include it in your application, along with its configuration.

Check out documentation (mostly in French, English translation coming now and then).

.NET Core

You need .NET Core

Nuget Package

Windows

Download Nuget.exe on https://dist.nuget.org/index.html Restore package: nuget.exe restore in project or solution folder. For more informations to restore needed packages, read Omnisharp output.

Linux/Osx

Coming soon.

.NET Core

You need .NET Core: https://dotnet.github.io/

Nuget Package

Windows

Download Nuget.exe on https://dist.nuget.org/index.html Restore package: nuget.exe restore in project or solution folder. For more informations to restore needed packages, read Omnisharp output.

Linux/Osx

Comming soon.

API Reference

Check out documentation (see link in Installation above). A complete API reference will be provided soon.

Tests

Unit tests were initially written using MS Tests, but only a few changes make them portable to nUnit/xUnit. We are working on porting them to xUnit.

Contributors

Issue tracker

License

GNU Affero General Public License version 3 or later.

http://www.gnu.org/licenses/agpl-3.0.html