Why Attritect: less code, less time
Measured on a real multi-tenant app built on Attritect (a SaaS for swimming academies, December 2026). The hand-written figures are estimates for a typical .NET stack.
One page, in real code
This is the complete Pools admin page of that app, about 33 lines (shortened here):
[CrudPage("pools", Entity = typeof(Pool), Title = "Pools", Group = "Setup",
DefaultSort = "Name", LookupText = "Name", Tenancy = TenantScope.Tenant)]
public class PoolModel
{
public int Id { get; set; }
[Parent(typeof(CenterModel)), Search(Op.Eq), Field(Label = "Center"), Required]
public int CenterId { get; set; }
[Grid(Sortable = true), Search(Op.Contains), Field, Required, SafeText(100)]
public string Name { get; set; } = "";
[Grid(Title = "Length (m)", Sortable = true), Field, Range(1, 200)]
public int LengthMeters { get; set; } = 25;
// ... Indoor, Heated, capacity, Active
}
From that class alone:
- API: list with search, sort and paging; get; create; update; delete
- Validation: required fields, lengths, ranges, no HTML, unique values
- Tenant isolation: each academy sees only its own pools; forged requests are refused
- Permissions: view, create, edit and delete checked separately
- Admin screen (Pro): grid, search form, add/edit dialog, Center as a parent, Arabic right to left
- Soft delete, audit fields and history (history with Pro), Excel export and import (Pro)
The same page by hand
| Piece you’d write | Typical lines |
|---|---|
| DTOs (list, details, create, update) | 60–100 |
| Validator | 30–50 |
| Controller (5 endpoints, paging, errors) | 100–150 |
| Service with tenant and permission checks | 100–150 |
| Search, filter and sort query code | 60–100 |
| List page + edit form | 200–300 |
| Translations wiring, export, history | 100+ |
| Total | ≈ 650–950 |
With Attritect: ≈ 30–40 lines, roughly 20× less per page.
The whole app: 19 admin pages in 649 lines of page models. By hand, roughly 12,000–18,000 lines.
Time
| Task | By hand | With Attritect |
|---|---|---|
| New admin screen | 1–2 days | 20–40 minutes |
| Add a field | 5–7 files (DTOs, validator, form, grid, export…) | One property with attributes |
| Searchable / sortable | Query code + UI | [Search], Sortable = true |
| Arabic translations | Wire up every screen | Lines in one .resx file |
| Security review | Every controller | One engine, tested once (296 tests, including a cross-tenant leak suite) |
Beyond line counts
- Consistency: every page behaves the same (paging, errors, permissions); learn it once.
- Fewer security bugs: tenant filtering and permission checks live in the engine, so a new page can’t forget them. Forgetting them is the most common cause of data leaking between customers.
- Mistakes caught while you type: compile-time checks flag a text search on a number, or a sort on a missing field, before the app runs.
Where it doesn’t help
- Custom workflows (booking, payments, a parent’s dashboard) are still normal code. Attritect covers the data screens behind them, usually 60–80% of an admin system.
- Learning curve: a day or two to learn the attributes and override points.
- Unusual screens still need custom pages, which can call the same API and permissions.
In short: “build a CRUD screen” goes from a day of repetitive work to one small class, so the time goes to what makes the product different.