Models and databases
Models define what data can be persisted and manipulated by a Marten application. They explicitly specify fields and rules that map to database tables and columns.
Guides
📄️ Introduction
Learn how to define models and interact with model records.
📄️ Queries
Learn how to query model records.
📄️ Relationships
Learn how to define relationships in models.
📄️ Validations
Learn how to validate model records.
📄️ Callbacks
Learn how to define model callbacks.
📄️ Migrations
Learn how to generate and work with model migrations.
📄️ Transactions
Learn how to leverage database transactions.
📄️ Raw SQL
Learn how to perform raw SQL queries.
📄️ Multiple databases
Learn how to leverage multiple databases in a Marten project.