Marten alternatives and similar packages
Based on the "Database" category.
Alternatively, view Marten alternatives based on common mentions on social networks and blogs.
Mongo DB9.9 10.0 L1 Marten VS Mongo DBThe MongoDB Database
LiteDB9.5 2.1 L3 Marten VS LiteDBLiteDB - A .NET NoSQL Document Store in a single data file - https://www.litedb.org
Ignite9.3 9.8 L4 Marten VS IgniteApache Ignite
Event Store9.0 8.4 L3 Marten VS Event StoreThe stream database optimised for event sourcing
RavenDB8.7 9.9 L2 Marten VS RavenDBACID Document Database
SqlKata Query Builder8.3 7.2 Marten VS SqlKata Query BuilderSQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird
Realm Xamarin6.5 7.9 L2 Marten VS Realm XamarinRealm is a mobile database: a replacement for SQLite & ORMs
Yessql6.5 0.0 L3 Marten VS YessqlA .NET document database working on any RDBMS
Insight.Database6.2 2.8 L2 Marten VS Insight.DatabaseFast, lightweight .NET micro-ORM
BrightstarDb5.1 0.0 L2 Marten VS BrightstarDbThis is the core development repository for BrightstarDB.
DBreeze4.9 0.0 Marten VS DBreezeC# .NET MONO NOSQL ( key value store embedded ) ACID multi-paradigm database management system.
Streamstone4.5 0.9 L4 Marten VS StreamstoneEvent store for Azure Table Storage
NReco LambdaParser4.0 0.0 L3 Marten VS NReco LambdaParserRuntime parser for string expressions (formulas, method calls). Builds dynamic LINQ expression tree and compiles it to lambda delegate.
ZoneTree3.0 10.0 Marten VS ZoneTreeZoneTree is a persistent, high-performance, transactional, ACID-compliant ordered key-value database for NET. It can operate in memory or on local/cloud storage.
RocksDB2.8 10.0 Marten VS RocksDB.net bindings for the rocksdb by facebook
StringDB2.4 0.0 Marten VS StringDBStringDB is a modular, key/value pair archival DB designed to consume *tiny* amounts of ram & produce *tiny* databases.
SliccDB2.2 0.0 Marten VS SliccDBLight Embedded Graph Database for .net
Firebase.Net2.0 0.0 Marten VS Firebase.NetC# wrapper over Firebase database REST API
Mailcloud.Hydra1.8 1.7 L5 Marten VS Mailcloud.HydraA set of components to take the most advantage of performance and capacity of Azure Storage.
Db4o-gpl1.7 0.0 Marten VS Db4o-gplnew Db4o GPL Source Code for Java7+ & .netstardard2.0 Android Xamarin..., the best database project to help you to learn how to make databases
Clean code begins in your IDE with SonarLint
* 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 Marten or a related project?
.NET Transactional Document DB and Event Store on PostgreSQL
The Marten library provides .NET developers with the ability to use the proven PostgreSQL database engine and its fantastic JSON support as a fully fledged document database. The Marten team believes that a document database has far reaching benefits for developer productivity over relational databases with or without an ORM tool.
Marten also provides .NET developers with an ACID-compliant event store with user-defined projections against event streams.
Access docs here and v3.x docs here.
Working with the Code
Before getting started you will need the following in your environment:
1. .NET Core SDK 5.0+ and the .NET Core 3.1 Runtime
2. PostgreSQL 9.6 or above database with PLV8
The fastest possible way to develop with Marten is to run PostgreSQL in a Docker container. Assuming that you have
Docker running on your local box, type
dotnet run --framework net6.0 -- init-db at the command line to spin up a Postgresql database with
PLv8 enabled and configured in the database. The default Marten test configuration tries to find this database if no
PostgreSQL database connection string is explicitly configured following the steps below:
Ensure the following:
- The login you are using to connect to your database is a member of the
- An environment variable of
marten_testing_databaseis set to the connection string for the database you want to use as a testbed. (See the Npgsql documentation for more information about PostgreSQL connection strings ).
Help with PSQL/PLV8
- On Windows, see this link for pre-built binaries of PLV8
- On *nix, check marten-local-db for a Docker based PostgreSQL instance including PLV8.
Once you have the codebase and the connection string file, run the build command or use the dotnet CLI to restore and build the solution.
You are now ready to contribute to Marten.
See more in [Contribution Guidelines](CONTRIBUTING.md).
- Unit Tests rely on xUnit and Shouldly
- Bullseye is used for build automation.
- Node.js runs our Mocha specs.
- Storyteller for some of the data intensive automated tests
|Description||Windows Commandline||PowerShell||Linux Shell||DotNet CLI|
|Run restore, build and test||
|Run all tests including mocha tests||
|Run just mocha tests||
|Run StoryTeller tests||
|Open StoryTeller editor||
|Run docs website locally||
Note: You should have a running Postgres instance while running unit tests or StoryTeller tests.
The tests for the main library are now broken into three testing projects:
CoreTests-- basic services like retries, schema management basics
DocumentDbTests-- anything specific to the document database features of Marten
EventSourcingTests-- anything specific to the event sourcing features of Marten
To aid in integration testing, Marten.Testing has a couple reusable base classes that can be use to make integration testing through Postgresql be more efficient and allow the xUnit.Net tests to run in parallel for better throughput.
IntegrationContext-- if most of the tests will use an out of the box configuration (i.e., no fluent interface configuration of any document types), use this base type. Warning though, this context type will not clean out the main
publicdatabase schema between runs, but will delete any existing data
DestructiveIntegrationContext-- similar to
IntegrationContext, but will wipe out any and all Postgresql schema objects in the
publicschema between tests. Use this sparingly please.
OneOffConfigurationsContext-- if a test suite will need to frequently re-configure the
DocumentStore, this context is appropriate. You do not need to decorate any of these test classes with the
[Collection]attribute. This fixture will use an isolated schema using the name of the test fixture type as the schema name
BugIntegrationContext-- the test harnesses for bugs tend to require custom
DocumentStoreconfiguration, and this context is a specialization of
OneOffConfigurationsContextfor the bugs schema.
StoreContextare helpful if a series of tests use the same custom
DocumentStoreconfiguration. You'd need to write a subclass of
StoreFixture, then use
StoreContext<YourNewStoreFixture>as the base class to share the
DocumentStorebetween test runs with xUnit.Net's shared context (
Refer to the build commands section to look up the commands to run Mocha tests. There is also
npm run tdd to run the mocha specifications
in a watched mode with growl turned on.
Note: remember to run
Refer to build commands section to look up the commands to open the StoryTeller editor or run the StoryTeller specs.
All the documentation is written in Markdown and the docs are published as a static site hosted in Netlify. v4.x and v3.x use different documentation tools hence are detailed below in separate sub-sections.
v4.x and above
VitePress is used as documentation tool. Along with this, MarkdownSnippets is used for adding code snippets to docs from source code and Algolia DocSearch is used for searching the docs via the search box.
The documentation content is the Markdown files in the
/docs directory directly under the project root. To run the docs locally use
npm run docs with auto-refresh on any changes.
To add code samples/snippets from the tests in docs, follow the steps below:
Use C# named regions to mark a code block as described in the sample below
#region sample_my_snippet // code sample/snippet // ... #endregion
All code snippet identifier starts with
sample_ as a convention to clearly identify that the region block corresponds to a sample code/snippet used in docs. Recommend to use snake case for the identifiers with words in lower case.
Use the below to include the code snippet in a docs page
<!-- snippet: sample_my_snippet --> <!-- endSnippet -->
Note that when you run the docs locally, the above placeholder block in the Markdown file will get updated inline with the actual code snippet from the source code. Please commit the changes with the auto-generated inline code snippet as-is after you preview the docs page. This helps with easier change tracking when you send PR's.
- Any changes to the code snippets will need to done in the source code. Do not edit/update any of the auto-generated inline code snippet directly in the Markdown files.
- The latest snippet are always pulled into the docs while we publish the docs. Hence do not worry about the inline code snippet in Markdown file getting out of sync with the snippet in source code.
stdocs is used as documentation tool. The documentation content is the markdown files in the
/documentation directory directly under the project root. Any updates to v3.x docs will need to done in 3.14 branch. To run the documentation website locally with auto-refresh, refer to the build commands section above.
If you wish to insert code samples/snippet to a documentation page from the tests, wrap the code you wish to insert with
// SAMPLE: name-of-sample and
Then to insert that code to the documentation, add
Note: content is published to the
gh-pagesbranch of this repository. Refer to build commands section to lookup the command for publishing docs.
Copyright © Jeremy D. Miller, Babu Annamalai, Oskar Dudycz, Joona-Pekka Kokko and contributors.
Marten is provided as-is under the MIT license. For more information see [LICENSE](LICENSE).
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
*Note that all licence references and agreements mentioned in the Marten README section above are relevant to that project's source code only.