Exodus alternatives and similar packages
Based on the "ORM" category.
Alternatively, view Exodus alternatives based on common mentions on social networks and blogs.
-
TypeORM
ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms. -
Dapper
DISCONTINUED. Dapper - a simple object mapper for .Net [Moved to: https://github.com/DapperLib/Dapper] -
Entity Framework
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. -
SqlSugar
.Net aot ORM Fastest ORM Simple Easy VB.NET Sqlite orm Oracle ORM Mysql Orm 虚谷数据库 postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping -
FreeSql
🦄 .NET aot orm, C# orm, VB.NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, 虚谷 orm, 国产 orm, Clickhouse orm, DuckDB orm, TDengine orm, QuestDB orm, MsAccess orm. -
EFCore.BulkExtensions
Entity Framework EF Core efcore Bulk Batch Extensions with BulkCopy in .Net for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, MySQL, SQLite -
Dapper Extensions
Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance. -
Entity Framework 6
This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore. -
SmartSql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics -
NPoco
Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco -
SQLProvider
A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides. -
MongoDB.Entities
A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management -
MongoDB Repository pattern implementation
DISCONTINUED. Repository abstraction layer on top of Official MongoDB C# driver -
DbExtensions
Data-access framework with a strong focus on query composition, granularity and code aesthetics. -
NReco.Data
Fast DB-independent DAL for .NET Core: abstract queries, SQL commands builder, schema-less data access, POCO mapping (micro-ORM). -
EntityFrameworkCore.SqlServer.SimpleBulks
Fast and simple bulk insert (retain client populated Ids or return db generated Ids), bulk update, bulk delete, bulk merge and bulk match for SQL Server. -
Linq.Expression.Optimizer
System.Linq.Expression expressions optimizer. http://thorium.github.io/Linq.Expression.Optimizer -
EntityFramework.DatabaseMigrator
EntityFramework.DatabaseMigrator is a WinForms utility to help manage Entity Framework 6.0+ migrations.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Exodus or a related project?
Popular Comparisons
README
Exodus
Simple database migrator for .NET Core 2.0.
- SQL file script based approach.
- Full async/await API support.
- Friendly fluent API.
- Forward-only migrations.
- Database setup functions (useful especially in development environments).
Supported databases:
- SQL Server.
- PostgreSQL (tested on 9.5+).
Supported frameworks:
- .NET Core 2.0.
Usage:
Installation
All released Exodus versions can be obtained via NuGet Package Manager.
Package | Description | Version | Build |
---|---|---|---|
Exodus.Core | Core components and abstractions. | 1.1.0 | |
Exodus.SqlServer | Migrator for SQL Server. | 1.0.0 | |
Exodus.Npgsql | Migrator for PostgreSQL. | 2.1.0 |
Migration
Migration is a file. It should contain SQL script which executed transforms database state from one version to another.
By convention, the file name has to be in given format:
[version number] - [migration name].sql
Example correct migration file names:
1 - InitializingMigration.sql
1 - Initializing Migration.sql
1-InitializingMigration.sql
0001 - InitializingMigration.sql
Migrations can be loaded from directory or assembly. Both topics are covered later in the documentation.
Migrations are run in ascending order by version.
Informations about applied migrations are stored in database in table named "Migrations".
Creating migrator
In order to perform migrations, we need to create Migrator object.
- SQL Server:
var connectionString =
"Server=(localDb)\\MSSQLLocalDB;" +
"Database=exodus.dev;" +
"Trusted_Connection=True;";
var migrator = new SqlServerMigrator(connectionString);
- PostgreSQL:
var connectionString =
"User ID=postgres;" +
"Password=postgres;" +
"Host=localhost;" +
"Port=5433;" +
"Database=exodus.dev;" +
"Pooling=true;";
var migrator = new NpgsqlMigrator(connectionString);
Running migrations
Running migrations in default setup is as easy as:
await migrator.MigrateAsync();
Or in synchronous way:
migrator.Migrate();
Default setup
Default setup is running migrations from directory where Exodus executable is located ("./" path).
Running migrations from directory
Specifying directory which will be recursively searched through for migrations looks like:
await migrator
.FromDirectory("../src/DevMigrations")
.MigrateAsync();
Running migrations from assembly
Specifying assembly which will be searched through for migrations looks like:
await migrator
.FromAssembly("Exodus.Examples.Migrations")
.MigrateAsync();
IMPORTANT: In order to load migrations from assembly, the assembly must be referenced in a calling project. Additionally, every migration file must have set properties:
Build Action: Embedded resource
Copy to Output Directory: Copy if newer
You can configure this in Visual Studio by right mouse button clicking on the file in Solution Explorer and selecting Properties from context menu.
Logging
Logging to console is just:
await migrator
.LogToConsole()
.MigrateAsync();
Custom logging is also simple:
await migrator
.Log(message =>
{
// custom logging logic here
// for example:
var formatted = $"Exodus > {message}";
Console.WriteLine(formatted);
})
.MigrateAsync();
Database setup
Note, that you need sufficient database server permissions to run these commands.
Create database if not exists:
await migrator
.CreateDatabaseIfNotExists()
.MigrateAsync();
Always recreate database:
await migrator
.DropCreateDatabase()
.MigrateAsync();
IMPORTANT: Database setup features were tested only in dev environments. Probably they are not useful in any other way. It is strongly not recommended to use database setup features in production.
Common use case
Common configuration, often used in development environments:
await migrator
.DropCreateDatabase()
.FromAssembly("MyProject.Migrations")
.LogToConsole()
.MigrateAsync();
More examples can be seen in source code, in examples projects.
Roadmap:
It's not strict roadmap, rather features which are highly possible to show in the future, especially if anybody would request them explicitly.
- Support for more database engines (looking at you, MySQL).
- ASP.NET Core integration.
- CLI.
- Integration tests for database engines.