{"id":50682762,"url":"https://github.com/deveel/kista","last_synced_at":"2026-06-08T20:04:22.094Z","repository":{"id":199351695,"uuid":"564494183","full_name":"deveel/kista","owner":"deveel","description":"Implementations of the repository pattern for .NET to support the domain-driven modeling","archived":false,"fork":false,"pushed_at":"2026-06-05T13:13:08.000Z","size":3192,"stargazers_count":3,"open_issues_count":23,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-05T13:15:22.847Z","etag":null,"topics":["clean-architechture","csharp","data","dotnet-core","dotnetcore","efcore","entity","entity-framework","entity-manager","layered-architecture","mongodb","repository","repository-manager","repository-pattern"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deveel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-10T20:55:44.000Z","updated_at":"2026-06-05T13:02:36.000Z","dependencies_parsed_at":"2026-05-18T21:03:18.218Z","dependency_job_id":null,"html_url":"https://github.com/deveel/kista","commit_stats":null,"previous_names":["deveel/deveel.repository","deveel/kista"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/deveel/kista","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fkista","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fkista/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fkista/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fkista/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deveel","download_url":"https://codeload.github.com/deveel/kista/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fkista/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34078062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architechture","csharp","data","dotnet-core","dotnetcore","efcore","entity","entity-framework","entity-manager","layered-architecture","mongodb","repository","repository-manager","repository-pattern"],"created_at":"2026-06-08T20:04:19.919Z","updated_at":"2026-06-08T20:04:22.089Z","avatar_url":"https://github.com/deveel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub release](https://img.shields.io/github/v/release/deveel/kista)\n[![Nuget release](https://img.shields.io/nuget/v/Kista?logo=nuget\u0026label=kista)](https://www.nuget.org/packages/Kista/)\n![GitHub license](https://img.shields.io/github/license/deveel/kista?color=blue)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/deveel/kista/ci.yml?logo=github)\n[![codecov](https://codecov.io/gh/deveel/kista/graph/badge.svg?token=5US7L3C7ES)](https://codecov.io/gh/deveel/kista)\n[![Documentation](https://img.shields.io/badge/kista.deveel.org-blue?style=flat\u0026logo=docusaurus\u0026label=docs)](https://kista.deveel.org/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"kista-full-logo.png\" alt=\"Kista logo\" width=\"500\"\u003e\n\u003c/p\u003e\n\n# Kista\n\n\u003e **Renamed:** This project was renamed from **Deveel.Repository** to **Kista** on **May 26, 2025**. The name *Kista* is Old Norse for \"chest\" or \"repository\", better reflecting the project's purpose as a data access framework.\n\n**Kista** is a lightweight .NET framework that provides a principled implementation of the [_Repository Pattern_](https://martinfowler.com/eaaCatalog/repository.html), designed to help developers build applications grounded in [_Domain-Driven Design (DDD)_](https://en.wikipedia.org/wiki/Domain-driven_design) and [_SOLID_](https://en.wikipedia.org/wiki/SOLID) principles.\n\nThe framework abstracts data access behind a clean, stable interface — keeping your domain model independent of any specific persistence technology — while integrating seamlessly with popular data-access libraries as the underlying backing store.\n\n---\n\n## Why Kista?\n\nAt its core, **Kista** is about _keeping your domain clean_.\n\nIn Domain-Driven Design the repository is not merely a data-access helper: it is the **boundary between the domain model and the infrastructure layer**. It speaks the language of the domain (entities, aggregates, identities) while hiding every detail of how data is fetched or persisted.\n\nThis library was born from the need to have a consistent, framework-agnostic abstraction for this boundary, without forcing application developers to:\n\n- couple their domain logic to a specific ORM or database driver, or\n- re-implement the same boilerplate repository scaffolding in every project.\n\n\u003e **It was never the intention to build another ORM.** Object-Relational Mappers (and document-mapper equivalents) such as Entity Framework Core, Dapper, or MongoFramework are excellent tools for mapping objects to storage. Kista _uses_ them — it does not replace them.\n\n### Kista vs. ORMs\n\nThe table below highlights the key differences and shows how both layers coexist:\n\n| Concern | ORM (EF Core, Dapper, …) | Kista |\n|---|---|---|\n| **Responsibility** | Map objects ↔ database tables / documents | Provide a domain-oriented access interface |\n| **Speaks the language of** | Database schema, SQL, drivers | Domain model (entities, aggregates) |\n| **Knows about** | Tables, columns, change tracking, transactions | Collections of entities and their identities |\n| **Lives in layer** | Infrastructure | Domain / Application boundary |\n| **Used by** | Repositories and infrastructure code | Application services and domain services |\n\nIn practice, **you create a repository _on top of_ an ORM** — the ORM handles low-level persistence while Kista defines _what_ the application can ask for. For example, `Kista.EntityFramework` wraps Entity Framework Core's `DbContext` behind the `IRepository\u003cTEntity\u003e` interface, giving the domain a stable contract that survives database migrations and EF Core upgrades. The same principle applies to `Kista.MongoFramework` (backed by MongoFramework / MongoDB) and any custom driver you care to write.\n\nThis is not a limitation — it is by design. Decoupling ORMs from domain logic is one of the most impactful architectural decisions you can make for long-term maintainability.\n\n---\n\n## Libraries\n\nThe framework is organized into a _kernel_ package (providing interfaces and abstractions) and a set of _driver_ packages that wire those abstractions to concrete data sources.\n\n- **Stable releases** are published to [**NuGet.org**](https://www.nuget.org/profiles/deveel).\n- **Pre-release / unstable builds** are available from the [**GitHub Packages**](https://github.com/deveel/kista/packages) feed (`https://nuget.pkg.github.com/kista/index.json`).\n\n| Package                                | Description                                                                                                   | NuGet (stable) | Pre-Release (GitHub) |\n|----------------------------------------|---------------------------------------------------------------------------------------------------------------| :------------: | :------------------: |\n| `Kista`               | Kernel abstractions: interfaces, base types, and DI extensions                                                | [![NuGet](https://img.shields.io/nuget/v/Kista.svg)](https://www.nuget.org/packages/Kista/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista) |\n| `Kista.InMemory`           | Volatile, in-process repository — ideal for testing and prototyping                                           | [![NuGet](https://img.shields.io/nuget/v/Kista.InMemory.svg)](https://www.nuget.org/packages/Kista.InMemory/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.InMemory.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.InMemory) |\n| `Kista.EntityFramework`    | Repository driver backed by [Entity Framework Core](https://github.com/dotnet/efcore)                         | [![NuGet](https://img.shields.io/nuget/v/Kista.EntityFramework.svg)](https://www.nuget.org/packages/Kista.EntityFramework/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.EntityFramework.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.EntityFramework) |\n| `Kista.MongoFramework`     | Repository driver backed by [MongoFramework](https://github.com/turnersoftware/mongoframework) / MongoDB      | [![NuGet](https://img.shields.io/nuget/v/Kista.MongoFramework.svg)](https://www.nuget.org/packages/Kista.MongoFramework/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.MongoFramework.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.MongoFramework) |\n| `Kista.MongoFramework.MultiTenant` | Multi-tenant MongoDB connection management via [Finbuckle.MultiTenant](https://github.com/Finbuckle/Finbuckle.MultiTenant) | [![NuGet](https://img.shields.io/nuget/v/Kista.MongoFramework.MultiTenant.svg)](https://www.nuget.org/packages/Kista.MongoFramework.MultiTenant/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.MongoFramework.MultiTenant.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.MongoFramework.MultiTenant) |\n| `Kista.DynamicLinq`        | Filter / query support via [System.Linq.Dynamic.Core](https://github.com/zzzprojects/System.Linq.Dynamic.Core) | [![NuGet](https://img.shields.io/nuget/v/Kista.DynamicLinq.svg)](https://www.nuget.org/packages/Kista.DynamicLinq/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.DynamicLinq.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.DynamicLinq) |\n| `Kista.Manager`            | Business layer (_EntityManager_) with validation, normalization, event sourcing, and logging                  | [![NuGet](https://img.shields.io/nuget/v/Kista.Manager.svg)](https://www.nuget.org/packages/Kista.Manager/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.Manager.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.Manager) |\n| `Kista.Manager.DynamicLinq` | Dynamic LINQ query extensions for the Entity Manager                                                          | [![NuGet](https://img.shields.io/nuget/v/Kista.Manager.DynamicLinq.svg)](https://www.nuget.org/packages/Kista.Manager.DynamicLinq/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.Manager.DynamicLinq.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.Manager.DynamicLinq) |\n| `Kista.Manager.EasyCaching` | Second-level caching for the Entity Manager via [EasyCaching](https://github.com/dotnetcore/EasyCaching)      | [![NuGet](https://img.shields.io/nuget/v/Kista.Manager.EasyCaching.svg)](https://www.nuget.org/packages/Kista.Manager.EasyCaching/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.Manager.EasyCaching.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.Manager.EasyCaching) |\n| `Kista.Manager.AspNetCore` | ASP.NET Core integration for automatic HTTP request cancellation                                              | [![NuGet](https://img.shields.io/nuget/v/Kista.Manager.AspNetCore.svg)](https://www.nuget.org/packages/Kista.Manager.AspNetCore/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.Manager.AspNetCore.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.Manager.AspNetCore) |\n| `Kista.Owners`             | Decorator-based user scoping with automatic owner assignment and query filtering                                   | [![NuGet](https://img.shields.io/nuget/v/Kista.Owners.svg)](https://www.nuget.org/packages/Kista.Owners/) | [![GitHub](https://img.shields.io/nuget/vpre/Kista.Owners.svg?label=pre\u0026color=blueviolet)](https://github.com/deveel/kista/packages/nuget/Kista.Owners) |\n\n---\n\n## Quick Start\n\n### 1. Install a driver package\n\nPick the driver that matches your data source. The `Core` kernel package is pulled in automatically as a transitive dependency:\n\n```bash\n# Entity Framework Core\ndotnet add package Kista.EntityFramework\n\n# MongoDB\ndotnet add package Kista.MongoFramework\n\n# In-Memory (testing / prototyping)\ndotnet add package Kista.InMemory\n```\n\nTo consume an unstable pre-release build, add the GitHub Packages feed first:\n\n```bash\ndotnet nuget add source https://nuget.pkg.github.com/kista/index.json \\\n  --name kista-github --username \u003cyour-github-username\u003e --password \u003cyour-pat\u003e\n```\n\n### 2. Register the repository\n\nUse the `AddRepositoryContext()` builder to configure your driver:\n\n```csharp\n// Program.cs\nbuilder.Services.AddRepositoryContext()\n    .UseInMemory();\n```\n\nFor Entity Framework Core or MongoDB, replace `.UseInMemory()` with the appropriate driver:\n\n```csharp\n// Entity Framework Core\nbuilder.Services.AddRepositoryContext()\n    .UseEntityFramework\u003cMyDbContext\u003e();\n\n// MongoDB\nbuilder.Services.AddRepositoryContext()\n    .UseMongoDB\u003cMyMongoContext\u003e();\n```\n\nAfter registration the following services are resolvable from the DI container (availability depends on the concrete repository's capabilities):\n\n| Interface | Description |\n|---|---|\n| `IRepository\u003cTEntity\u003e` | Core CRUD, single-entity look-up (`FindAsync`), and unsorted pagination (`GetPageAsync`) |\n| `ITrackingRepository\u003cTEntity\u003e` | Change tracking and original value look-ups |\n\n\u003e **Note:** The legacy interfaces `IQueryableRepository`, `IPageableRepository`, and `IFilterableRepository` are deprecated. Query capabilities are now provided through `protected` members of `Repository\u003cTEntity, TKey\u003e`. For domain-specific queries, extend the base repository with custom methods. See the [full documentation](docs/index.md) for details.\n\n### 3. Consume the repository in your services\n\n```csharp\npublic class OrderService(IRepository\u003cOrder\u003e orders)\n{\n    public Task\u003cOrder?\u003e GetAsync(string id, CancellationToken ct)\n        =\u003e orders.FindAsync(id, ct);\n\n    public Task PlaceAsync(Order order, CancellationToken ct)\n        =\u003e orders.AddAsync(order, ct);\n}\n```\n\nFor driver-specific configuration, multi-tenancy, and guidance on writing a custom repository, refer to the [full documentation](docs/index.md) or browse it online at [GitBook](https://deveel.gitbook.io/kista/).\n\n---\n\n## Documentation and Guides\n\n| Topic | Description |\n|---|---|\n| [Getting Started](docs/index.md) | Installation, requirements, and first steps |\n| [Entity Framework Core driver](docs/repository-implementations/ef-core.md) | Storing entities via EF Core |\n| [MongoDB driver](docs/repository-implementations/mongodb.md) | Storing entities in MongoDB |\n| [In-Memory driver](docs/repository-implementations/in-memory.md) | In-process volatile storage |\n| [Entity Manager](docs/entity-manager/) | Business layer with validation, caching, and events |\n| [Custom repositories](docs/custom-repository/) | Write your own driver |\n| [Multi-Tenancy](docs/multi-tenancy.md) | Tenant-isolated repositories |\n| [User Entities](docs/user-entities.md) | User-scoped entities with owner filtering |\n\nFull documentation is also available on [GitBook](https://deveel.gitbook.io/kista/).\n\n---\n\n## Roadmap\n\nWe are actively building Kista toward a comprehensive, production-ready framework. See the [complete roadmap](ROADMAP.md) for detailed feature descriptions, timelines, and architectural decisions.\n\n### Release Timeline\n\n- [x] **v1.5.0** — \"Solid Ground\"\n  - [x] Package Namespace Correction\n  - [x] Thread-Safe In-Memory Repository\n  - [x] Expression Compilation Cache\n  - [x] Full .NET 10 Compatibility and Benchmark Baseline\n  - [x] XML Documentation Completeness\n  - [x] Conversion to ValueTask Results for Asynchronous Methods\n  - [x] General Performance Optimizations\n\n- [ ] **v1.6.0** — \"Developer Flow\"\n  - [x] Unified Repository Setup Builder\n  - [ ] QueryBuilder Execution Extensions\n  - [x] Pluggable Cache Provider Abstraction\n  - [x] Automatic Timestamp and Ownership Management\n  - [ ] Repository Health Checks\n  - [x] Repository Controller Lifecycle Redesign\n\n- [ ] **v1.7.0** — \"Entity Lifecycle\"\n  - [ ] Soft Delete Support\n  - [ ] Entity State Machine\n  - [ ] Domain Event Emission from EntityManager\n\n- [ ] **v1.8.0** — \"Scale \u0026 Throughput\"\n  - [ ] Batch Operations in EntityManager\n  - [ ] Async Streaming Queries\n  - [ ] Read/Write Repository Split\n\n- [ ] **v1.9.0** — \"Observability \u0026 Governance\"\n  - [ ] OpenTelemetry Integration\n  - [ ] Audit Trail Support\n  - [ ] EF Core Multi-Tenancy Parity\n\n- [ ] **v2.0.0** — \"Platform Modernization\"\n  - [ ] Minimum .NET 9 Baseline\n  - [ ] Simplified Repository Interface Hierarchy\n  - [ ] Remove Obsolete Capability Interfaces\n  - [ ] Repository Source Generators\n\n- [ ] **v2.1.0** — \"New Database Drivers\"\n  - [ ] PostgreSQL Native Driver\n  - [ ] Azure Cosmos DB Driver\n  - [ ] Dapper Repository Driver\n  - [ ] Service-Based Repository Driver\n  - [ ] Neo4j Repository Driver\n\nFor more details on features, design rationale, and success criteria, see the [ROADMAP](ROADMAP.md).\n\n---\n\n## License\n\nThe project is licensed under the terms of the [Apache Public License v2](LICENSE), which allows unrestricted use in any project — open-source or commercial — without restriction.\n\n## Contributing\n\nThe project is open to contributions. Please read the [contributing guidelines](CONTRIBUTING.md) before opening a pull request.\n\n## Contributors\n\nA huge thank-you to everyone who has contributed code, documentation, bug reports, and ideas:\n\n[![Contributors](https://contrib.rocks/image?repo=deveel/kista)](https://github.com/deveel/kista/graphs/contributors)\n\n_Contributions of all kinds are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) to get started._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveel%2Fkista","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveel%2Fkista","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveel%2Fkista/lists"}