Quickstart
Jerrycurl is available on NuGet and the Visual Studio Marketplace.
Installation
To create your first Jerrycurl project, simply install the VSIX, select the Jerrycurl Library template and follow the instructions on the screen.
On the main screen simply start by selecting your vendor (see Supported Vendors) and entering the connection string of your database.
-- image here
After creating your project, you will see a common MVC-like structure:
|- Accessors/
|- Commands/
|- Queries/
|- CoreDomain.cs
|- Database.orm
This will create a library with a well known MVC structure consisting of:
- Models (classes representing input/output data for your SQL)
- Commands (Razor SQL code that writes to your database)
- Queries (Razor SQL code that reads from your database)
- Accessors (binding Razor SQL with models)
Models
In a Jerrycurl project, the model of your database is handled by a special file with the .orm extension. This
is a simple JSON configuration file which contains the source for synchronizing your database schema. The .orm file defines the structure of your database, including tables, columns, and relationships. By using this configuration file, you can easily keep your database schema in sync with your application code, ensuring consistency and reducing the risk of errors.
Example of a .orm file:
{
"tables": [
{
"name": "Blog",
"columns": [
{ "name": "Id", "type": "int", "isPrimaryKey": true },
{ "name": "Title", "type": "string" },
{ "name": "Content", "type": "string" },
{ "name": "CreatedOn", "type": "datetime" }
]
}
]
}