I recently gave a talk on my experiences with Marten and Postgres at the wonderful Brisbane .NET User Group.
Postgres is a fast, “free”, and incredibly versatile database engine, and Marten is an excellent Document storage API sitting on top of it for the .NET framework. It’s an excellent alternative to using EF and a relational model, RavenDB, or other options like Cosmos, and a great option in a lot of projects.
The video is up on YouTube now so I thought I’d bring all the pieces together here.
The code and slides are up here on GitHub and includes a couple of things I discuss during the talk.
This JSONB querying cheat sheet is indispensable. I’ve included a link to the source but copied the content should it ever go offline.
There are also some snippets and code for turning a Marten JSON document into a full text search, including Rachid Belaid’s excellent post on the fundamentals of Postgres full text search.
The questions and discussion that night were amazing, we went into a bunch of edge cases I’d not hit before. I discussed one of the things to look out for when using Marten queryables in a web API and some solutions. It had been a while looked deeply at the causes, it’s just on my mental list of “You need to do this”. Huge shout out to Lexy Zhitenev for doing a deep dive into the root cause and documenting it all on the GitHub repository. Worth a read!
Big thanks to the BNENETUG crew and everybody who came out that night.