Quick start
From a database to working C# code in five steps. Each step links to the page that explains it in full.
-
1
Download and run the app
Download takes you to the latest release on GitHub. Pick the file for your system: TheSharpFactory-win-x64.zip for Windows (win-arm64 on ARM), TheSharpFactory-osx-arm64.zip for a Mac with Apple silicon (osx-x64 on Intel) or TheSharpFactory-linux-x64.tar.gz for Linux. Unzip it and run it. It is self-contained: no .NET install and no account. The macOS app is not signed yet, so macOS blocks it the first time: open it once, then go to System Settings > Privacy & Security and choose Open Anyway. On macOS 14 or earlier, right-click the app and choose Open instead.
Download -
2
Create a model from your database
Choose New, connect to SQL Server, pick the tables, views, procedures, functions and sequences you want, and save the model file.
Model generation → -
3
Sync into your solution
Open Sync and pick your .sln or .slnx (or create one): the page shows every file that would change. Then click Sync. The same works from the command line:
$ sharpfactory sync model.edmj MyApp.slnx --preview -
4
Set up your project
Add the package, the connection string and the repository container to the project that uses the generated code.
Project setup → -
5
Write your first query
Use the repositories to create, read, update and delete, and the Query class to filter, sort and page.
Query syntax →
Prefer video?
Short walkthroughs of the first model, CRUD, queries, procedures and more. They show an earlier version of the app.