Browse Source

Merge branch 'abpframework:dev' into AsyncKeyedLock

pull/24209/head
Mark Cilia Vincenti 9 months ago
committed by GitHub
parent
commit
3743fbc1c6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      Directory.Packages.props
  2. 1
      README.md
  3. 1
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
  4. 9
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
  5. 89
      docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/POST.md
  6. BIN
      docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/cover-image.png
  7. BIN
      docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/upgrade-abp-packages.png
  8. 8
      docs/en/Community-Articles/2025-11-15-Announcing-SSR-Support/article.md
  9. 25
      docs/en/Community-Articles/2025-11-19-ABP-BLACK-FRIDAY-BLOG/post.md
  10. 158
      docs/en/Community-Articles/2025-11-21-AntiGravity/Post.md
  11. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/agent-settings.png
  12. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/anti-gravity-ui.png
  13. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/breakpoint.png
  14. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/cover.png
  15. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/csharp-debug-extension.png
  16. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/debug.png
  17. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/errors.png
  18. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/extension-features.png
  19. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/extension.png
  20. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/find-website-port.png
  21. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/image-20251123185724281.png
  22. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/llms.png
  23. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/mcp.png
  24. BIN
      docs/en/Community-Articles/2025-11-21-AntiGravity/pricing.png
  25. BIN
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/coverimage.png
  26. 114
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/chat-history-hybrid.svg
  27. 150
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/mcp-architecture.svg
  28. 135
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/multilingual-rag.svg
  29. 112
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/pgvector-integration.svg
  30. 118
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/rag-parent-child.svg
  31. 60
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/reasoning-effort-diagram.svg
  32. 149
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/svg-diagram-example.svg
  33. 414
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/post.md
  34. 1
      docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/summary.md
  35. 60
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/POST.md
  36. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/1.png
  37. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/2.png
  38. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/21.png
  39. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/3.png
  40. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/4.png
  41. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/41.png
  42. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/42.png
  43. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/5.png
  44. BIN
      docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/cover.png
  45. BIN
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/cover.png
  46. 145
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/architecture-diagram.svg
  47. 82
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/automatic-caching-flow.svg
  48. 141
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-invalidation-flow.svg
  49. 135
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-scoping-diagram.svg
  50. 797
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/post.md
  51. 1
      docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/summary.md
  52. 14
      docs/en/cli/index.md
  53. 2
      docs/en/contribution/angular-ui.md
  54. 24
      docs/en/docs-nav.json
  55. 307
      docs/en/framework/infrastructure/artificial-intelligence.md
  56. 38
      docs/en/framework/infrastructure/artificial-intelligence/index.md
  57. 176
      docs/en/framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md
  58. 135
      docs/en/framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md
  59. 2
      docs/en/framework/infrastructure/index.md
  60. 38
      docs/en/framework/ui/angular/component-replacement.md
  61. 2
      docs/en/framework/ui/angular/data-table-column-extensions.md
  62. 2
      docs/en/framework/ui/angular/dynamic-form-extensions.md
  63. 2
      docs/en/framework/ui/angular/entity-action-extensions.md
  64. 19
      docs/en/framework/ui/angular/form-validation.md
  65. 4
      docs/en/framework/ui/angular/http-requests.md
  66. 24
      docs/en/framework/ui/angular/lazy-load-service.md
  67. 2
      docs/en/framework/ui/angular/list-service.md
  68. 4
      docs/en/framework/ui/angular/localization.md
  69. 24
      docs/en/framework/ui/angular/modifying-the-menu.md
  70. 2
      docs/en/framework/ui/angular/page-toolbar-extensions.md
  71. 91
      docs/en/framework/ui/angular/permission-management-component-replacement.md
  72. 8
      docs/en/framework/ui/angular/pwa-configuration.md
  73. 22
      docs/en/framework/ui/angular/quick-start.md
  74. 2
      docs/en/framework/ui/angular/router-events.md
  75. 10
      docs/en/framework/ui/angular/service-proxies.md
  76. 280
      docs/en/framework/ui/angular/ssr-configuration.md
  77. 2
      docs/en/framework/ui/angular/subscription-service.md
  78. 2
      docs/en/framework/ui/angular/testing.md
  79. 8
      docs/en/framework/ui/angular/theming.md
  80. 38
      docs/en/framework/ui/angular/track-by-service.md
  81. 2
      docs/en/get-started/empty-aspnet-core-application.md
  82. 11
      docs/en/get-started/layered-web-application.md
  83. 4
      docs/en/get-started/microservice.md
  84. 8
      docs/en/get-started/single-layer-web-application.md
  85. BIN
      docs/en/images/abp-overall-diagram-1600.png
  86. BIN
      docs/en/images/db-options.png
  87. BIN
      docs/en/images/elsa-studio-wasm.png
  88. BIN
      docs/en/images/ui-options.png
  89. 71
      docs/en/modules/ai-management/index.md
  90. 85
      docs/en/modules/elsa-pro.md
  91. 6
      docs/en/modules/file-management.md
  92. 3
      docs/en/modules/identity-pro.md
  93. 0
      docs/en/modules/identity/ldap.md
  94. 20
      docs/en/release-info/migration-guides/abp-10-0.md
  95. 2
      docs/en/release-info/migration-guides/abp-5-0-angular.md
  96. 4
      docs/en/release-info/release-notes.md
  97. 2
      docs/en/samples/easy-crm.md
  98. 2
      docs/en/samples/microservice-demo.md
  99. 2
      docs/en/solution-templates/layered-web-application/web-applications.md
  100. 2
      docs/en/suite/editing-templates.md

6
Directory.Packages.props

@ -122,11 +122,11 @@
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.14.0" />
<PackageVersion Include="Minio" Version="6.0.5" />
<PackageVersion Include="MongoDB.Driver" Version="3.5.0" />
<PackageVersion Include="MongoDB.Driver" Version="3.5.2" />
<PackageVersion Include="NEST" Version="7.17.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Nito.AsyncEx.Context" Version="5.1.2" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0-rc.1" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="NuGet.Versioning" Version="6.14.0" />
<PackageVersion Include="NUglify" Version="1.21.17" />
@ -168,7 +168,7 @@
<PackageVersion Include="Slugify.Core" Version="5.1.1" />
<PackageVersion Include="Spectre.Console" Version="0.51.1" />
<PackageVersion Include="StackExchange.Redis" Version="2.9.17" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="9.0.4" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.0.1" />
<PackageVersion Include="System.Collections.Immutable" Version="10.0.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.6.7" />

1
README.md

@ -14,6 +14,7 @@
- [Quick Start](https://abp.io/docs/latest/tutorials/todo) is a single-part, quick-start tutorial to build a simple application with the ABP Framework. Start with this tutorial if you want to understand how ABP works quickly.
- [Web Application Development Tutorial](https://abp.io/docs/latest/tutorials/book-store) is a complete tutorial on developing a full-stack web application with all aspects of a real-life solution.
- [Modular Monolith Application](https://abp.io/docs/latest/tutorials/modular-crm/index): A multi-part tutorial that demonstrates how to create application modules, compose and communicate them to build a monolith modular web application.
- [Microservice Tutorial](https://abp.io/docs/latest/tutorials/microservice/index): A multi-part guide that walks you through building a microservice solution with ABP, from creating independent services and enabling inter-service communication to exposing them through an API Gateway and generating CRUD pages with ABP Suite.
## What ABP Provides?

1
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json

@ -672,6 +672,7 @@
"SupportQuestionCountPerDeveloperOnRenewLicense": "Support Question Count Per Developer for License Renewal",
"SupportQuestionCountPerDeveloperOnNewLicense": "Support Question Count Per Developer for New License",
"IncludedDeveloperCount": "Included Developer Count",
"AiTokenCountPerDeveloper": "AI Token Count Per Developer",
"CanBuyAdditionalDevelopers": "Can Buy Additional Developers",
"HasEmailSupport": "Has Email Support",
"IsSupportPrivateQuestion": "Can Open Private Support Question",

9
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json

@ -1553,6 +1553,15 @@
"IntegrateToYourKubernetesCluster_Description1": "<span class=\"text-highlight-white\">Connect your local development environment to a local or remote Kubernetes cluster</span>, where that cluster already runs your microservice solution.",
"IntegrateToYourKubernetesCluster_Description2": "Access any service in Kubernetes with their service name as DNS, just like they are running in your local computer.",
"IntegrateToYourKubernetesCluster_Description3": "<span class=\"text-highlight-white\">Intercept any service</span> in that cluster, so all the <span class=\"text-highlight-white\">traffic to the intercepted service is automatically redirected to your service </span>that is running in your local machine. When your service needs to use any service in Kubernetes, the traffic is redirected back to the cluster, just like your local service is running inside the Kubernetes.",
"AskOurAiAssistant": "Ask Our AI Assistant",
"AskOurAiAssistant_Description1": "Build faster with an AI that actually understands your ABP project. The ABP AI Assistant answers your technical questions, explains your code, and helps you solve problems directly inside ABP Studio — with full awareness of your project’s structure. You can even send screenshots or code files to get precise, context-based guidance.",
"AskOurAiAssistant_Description2": "What It Helps You Do",
"AskOurAiAssistant_Description3": "Ask anything about your ABP project — domain layer, modules, configuration, entities, services, or UI.",
"AskOurAiAssistant_Description4": "Get smart, code-aware explanations tailored to your solution.",
"AskOurAiAssistant_Description5": "Generate snippets and scaffolding suggestions instantly.",
"AskOurAiAssistant_Description6": "Fix errors faster with context-aware debugging support.",
"AskOurAiAssistant_Description7": "Learn ABP best practices as you build.",
"AskOurAiAssistant_Description8": "Whether you're generating new features, debugging an issue, or exploring a module, the AI Assistant gives you actionable, project-specific answers — right when you need them.",
"GetInformed": "Get Informed",
"Studio_GetInformed_Description1": "Leave your contact information to <span class=\"text-highlight-white\">get informed</span> and <span class=\"text-highlight-white\">try it first</span> when ABP Studio has been launched.",
"Studio_GetInformed_Description2": "Planned preview release date: Q3 of 2023.",

89
docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/POST.md

@ -0,0 +1,89 @@
# ABP.IO Platform 10.0 Final Has Been Released!
We are glad to announce that [ABP](https://abp.io/) 10.0 stable version has been released today.
## What's New With Version 10.0?
All the new features were explained in detail in the [10.0 RC Announcement Post](https://abp.io/community/announcements/announcing-abp-10-0-release-candidate-86lrnyox), so there is no need to review them again. You can check it out for more details.
## Getting Started with 10.0
### How to Upgrade an Existing Solution
You can upgrade your existing solutions with either ABP Studio or ABP CLI. In the following sections, both approaches are explained:
### Upgrading via ABP Studio
If you are already using the ABP Studio, you can upgrade it to the latest version. ABP Studio periodically checks for updates in the background, and when a new version of ABP Studio is available, you will be notified through a modal. Then, you can update it by confirming the opened modal. See [the documentation](https://abp.io/docs/latest/studio/installation#upgrading) for more info.
After upgrading the ABP Studio, then you can open your solution in the application, and simply click the **Upgrade ABP Packages** action button to instantly upgrade your solution:
![](upgrade-abp-packages.png)
### Upgrading via ABP CLI
Alternatively, you can upgrade your existing solution via ABP CLI. First, you need to install the ABP CLI or upgrade it to the latest version.
If you haven't installed it yet, you can run the following command:
```bash
dotnet tool install -g Volo.Abp.Studio.Cli
```
Or to update the existing CLI, you can run the following command:
```bash
dotnet tool update -g Volo.Abp.Studio.Cli
```
After installing/updating the ABP CLI, you can use the [`update` command](https://abp.io/docs/latest/CLI#update) to update all the ABP related NuGet and NPM packages in your solution as follows:
```bash
abp update
```
You can run this command in the root folder of your solution to update all ABP related packages.
## Migration Guides
There are a few breaking changes in this version that may affect your application. Please read the migration guide carefully, if you are upgrading from v9.x: [ABP Version 10.0 Migration Guide](https://abp.io/docs/10.0/release-info/migration-guides/abp-10-0)
## Community News
### New ABP Community Articles
As always, exciting articles have been contributed by the ABP community. I will highlight some of them here:
* [Alper Ebiçoğlu](https://abp.io/community/members/alper)
* [Optimize your .NET app for production Part 1](https://abp.io/community/articles/optimize-your-dotnet-app-for-production-for-any-.net-app-wa24j28e)
* [Optimize your .NET app for production Part 2](https://abp.io/community/articles/optimize-your-dotnet-app-for-production-for-any-.net-app-2-78xgncpi)
* [Return Code vs Exceptions: Which One is Better?](https://abp.io/community/articles/return-code-vs-exceptions-which-one-is-better-1rwcu9yi)
* [Sumeyye Kurtulus](https://abp.io/community/members/sumeyye.kurtulus)
* [Building Scalable Angular Apps with Reusable UI Components](https://abp.io/community/articles/building-scalable-angular-apps-with-reusable-ui-components-b9npiff3)
* [Angular Library Linking Made Easy: Paths, Workspaces and Symlinks](https://abp.io/community/articles/angular-library-linking-made-easy-paths-workspaces-and-5z2ate6e)
* [erdem çaygör](https://abp.io/community/members/erdem.caygor)
* [Building Dynamic Forms in Angular for Enterprise](https://abp.io/community/articles/building-dynamic-forms-in-angular-for-enterprise-6r3ewpxt)
* [From Server to Browser: Angular TransferState Explained](https://abp.io/community/articles/from-server-to-browser-angular-transferstate-explained-m99zf8oh)
* [Mansur Besleney](https://abp.io/community/members/mansur.besleney)
* [Top 10 Exception Handling Mistakes in .NET](https://abp.io/community/articles/top-10-exception-handling-mistakes-in-net-jhm8wzvg)
* [Berkan Şaşmaz](https://abp.io/community/members/berkansasmaz)
* [How to Dynamically Set the Connection String in EF Core](https://abp.io/community/articles/how-to-dynamically-set-the-connection-string-in-ef-core-30k87fpj)
* [Oğuzhan Ağır](https://abp.io/community/members/oguzhan.agir)
* [The ASP.NET Core Dependency Injection System](https://abp.io/community/articles/the-asp.net-core-dependency-injection-system-3vbsdhq8)
* [Selman Koç](https://abp.io/community/members/selmankoc)
* [5 Things Keep in Mind When Deploying Clustered Environment](https://abp.io/community/articles/5-things-keep-in-mind-when-deploying-clustered-environment-i9byusnv)
* [Muhammet Ali ÖZKAYA](https://abp.io/community/members/m.aliozkaya)
* [Repository Pattern in ASP.NET Core](https://abp.io/community/articles/repository-pattern-in-asp.net-core-2dudlg3j)
* [Armağan Ünlü](https://abp.io/community/members/armagan)
* [UI/UX Trends That Will Shape 2026](https://abp.io/community/articles/UI-UX-Trends-That-Will-Shape-2026-bx4c2kow)
* [Salih](https://abp.io/community/members/salih)
* [What is That Domain Service in DDD for .NET Developers?](https://abp.io/community/articles/what-is-that-domain-service-in-ddd-for-.net-developers-uqnpwjja)
* [Building an API Key Management System with ABP Framework](https://abp.io/community/articles/building-an-api-key-management-system-with-abp-framework-28gn4efw)
* [Fahri Gedik](https://abp.io/community/members/fahrigedik)
* [Signal-Based Forms in Angular](https://abp.io/community/articles/signal-based-forms-in-angular-21-9qentsqs)
Thanks to the ABP Community for all the content they have published. You can also [post your ABP related (text or video) content](https://abp.io/community/posts/create) to the ABP Community.
## About the Next Version
The next feature version will be 10.1. You can follow the [release planning here](https://github.com/abpframework/abp/milestones). Please [submit an issue](https://github.com/abpframework/abp/issues/new) if you have any problems with this version.

BIN
docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/cover-image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
docs/en/Blog-Posts/2025-08-08 v10_0_Release_Stable/upgrade-abp-packages.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

8
docs/en/Community-Articles/2025-11-15-Announcing-SSR-Support/article.md

@ -29,14 +29,14 @@ Server-Side Rendering refers to an approach which renders your Angular applicati
You can easily add SSR support to your existing ABP Angular application using the Angular CLI with ABP schematics:
> Adds SSR configuration to your project
```bash
# Generate SSR configuration for your project
ng generate @abp/ng.schematics:ssr-add
# Or using the short form
```
> Short form
```bash
ng g @abp/ng.schematics:ssr-add
```
If you have multiple projects in your workspace, you can specify which project to add SSR to:
```bash

25
docs/en/Community-Articles/2025-11-19-ABP-BLACK-FRIDAY-BLOG/post.md

@ -0,0 +1,25 @@
**ABP Black Friday Deals are Almost Here\!**
The season of huge savings is back\! We are happy to announce **ABP Black Friday Campaign**, packed with exclusive deals that you simply won't want to miss. Whether you are ready to start building with ABP or looking to expand your existing license, this is your chance to maximize your savings\!
**Campaign Dates: Mark Your Calendar**
Black Friday campaign is live for one week only\! Our deals run from: **November 24th \- December 1st.**
Don't miss this limited-time opportunity to **save up to $3,000** and take your software development to the next level.
**What's Included in the ABP Black Friday Campaign?**
Here’s why this campaign is the best time to buy or upgrade:
* Open to Everyone: This campaign is available for both new and existing customers.
* Stack Your Savings: You can combine this Black Friday offer with our multi-year discounts for the greatest possible value.
* Flexible Upgrades: Planning to upgrade to a higher package? Now is the perfect time to make that move at a lower cost.
* More Developer Seats? No Problem\! Additional developer seats are also eligible under this campaign, allowing you to grow your team effortlessly and affordably.
**Save Money Now\!**
This campaign is your best opportunity all year to unlock advanced features, scale your team, or upgrade your plan while **saving up to $3,000.** Secure your savings before the campaign ends on December 1st\!
[**Visit Pricing Page to Explore Offers\!**](https://abp.io/pricing)

158
docs/en/Community-Articles/2025-11-21-AntiGravity/Post.md

@ -0,0 +1,158 @@
# My First Look and Experience with Google AntiGravity
## Is Google AntiGravity Going to Replace Your Main Code Editor?
Today, I tried the new code-editor AntiGravity by Google. *"It's beyond a code-editor*" by Google 🙄
When I first launch it, I see the UI is almost same as Cursor. They're both based on Visual Studio Code.
That's why it was not hard to find what I'm looking for.
First of all, the main difference as I see from the Cursor is; when I type a prompt in the agent section **AntiGravity first creates a Task List** (like a road-map) and whenever it finishes a task, it checks the corresponding task. Actually Cursor has a similar functionality but AntiGravity took it one step further.
Second thing which was good to me; AntiGravity uses [Nano Banana 🍌](https://gemini.google/tr/overview/image-generation/). This is Google's AI image generation model... Why it's important because when you create an app, you don't need to search for graphics, deal with image licenses. **AntiGravity generates images automatically and no license is required!**
Third exciting feature for me; **AntiGravity is integrated with Google Chrome and can communicate with the running website**. When I first run my web project, it installed a browser extension which can see and interact with my website. It can see the results, click somewhere else on the page, scroll, fill up the forms, amazing 😵
Another feature I loved is that **you can enter a new prompt even while AntiGravity is still generating a response** 🧐. It instantly prioritizes the latest input and adjusts the ongoing process if needed. But in Cursor, if you add a prompt before the cursor finishes, it simply queues it and runs it later 😔.
And lastly, **AntiGravity is working very good with Gemini 3**.
Well, everything was not so perfect 😥 When I tried AntiGravity, couple of times it stucked AI generation and Agent stopped. I faced errors like this 👇
![Errors](errors.png)
## Debugging .NET Projects via AntiGravity
⚠ There's a crucial development issue with AntiGravity (and also for Cursor, Windsurf etc...) 🤕 you **cannot debug your .NET application with AntiGravity 🥺.** *This is Microsoft's policy!* Microsoft doesn't allow debugging for 3rd party IDEs and shows the below error... That's why I cannot say it's a downside of AntiGravity. You need to use Microsft's original VS Code, Visual Studio or Rider for debugging. But wait a while there's a workaround for this, I'll let you know in the next section.
![Debugging](debug.png)
### What does this error mean?
AntiGravity, Cursor, Windsurf etc... are using Visual Studio Code and the C# extension for VS Code includes the Microsoft .NET Core Debugger "*vsdbg*".
VS Code is open-source but "*vsdbg*" is not open-source! It's working only with Visual Studio Code, Visual Studio and Visual Studio for Mac. This is clearly stated at [Microsoft's this link](https://github.com/dotnet/vscode-csharp/blob/main/docs/debugger/Microsoft-.NET-Core-Debugger-licensing-and-Microsoft-Visual-Studio-Code.md).
### Ok! How to resolve debugging issue with AntiGravity? and Cursor and Windsurf...
There's a free C# debugger extension for Visual Studio Code based IDEs that supports AntiGravity, Cursor and Windsurf. The extension name is **C#**.
You can download this free C# debugger extension at 👉 [open-vsx.org/extension/muhammad-sammy/csharp/](https://open-vsx.org/extension/muhammad-sammy/csharp/).
For AntiGravity open Extension window (*Ctrl + Shift + X*) and search for `C#`, there you'll see this extension.
![C# Debugging Extension](csharp-debug-extension.png)
After installing, I restarted AntiGravity and now I can see the red circle which allows me to add breakpoint on C# code.
![Add C# Breakpoint](breakpoint.png)
### Another Extension For Debugging .NET Apps on VS Code
Recently I heard about DotRush extension from the folks. As they say DotRush works slightly faster and support Razor pages (.cshtml files).
Here's the link for DotRush https://github.com/JaneySprings/DotRush
### Finding Website Running Port
When you run the web project via C# debugger extension, normally it's not using the `launch.json` therefore the website port is not the one when you start from Visual Studio / Rider... So what's my website's port which I just run now? Normally for ASP.NET Core **the default port is 5000**. You can try navigating to http://localhost:5000/.
Alternatively you can write the below code in `Program.cs` which prints the full address of your website in the logs.
If you do the steps which I showed you, you can debug your C# application via AntiGravity and other VS Code derivatives.
![Find Website Port](find-website-port.png)
## How Much is AntiGravity? 💲
Currently there's only individual plan is available for personal accounts and that's free 👏! The contents of Team and Enterprise plans and prices are not announced yet. But **Gemini 3 is not free**! I used it with my company's Google Workspace account which we normally pay for Gemini.
![Pricing](pricing.png)
## More About AntiGravity
There have been many AI assisted IDEs like [Windsurf](https://windsurf.com/), [Cursor](https://cursor.com/), [Zed](https://zed.dev/), [Replit](https://replit.com/) and [Fleet](https://www.jetbrains.com/fleet/). But this time it's different, this is backed by Google.
As you see from the below image AntiGravity, uses a standard grid layout as others based on VS Code editor.
It's very similar to Cursor, Visual Studio, Rider.
![AntiGravity UI](anti-gravity-ui.png)
## Supported LLMs 🧠
Antigravity offers the below models which supports reasoning: Gemini 3 Pro, Claude Sonnet 4.5, GPT-OSS
![LLMs](llms.png)
Antigravity uses other models for supportive tasks in the background:
- **Nano banana**: This is used to generate images.
- **Gemini 2.5 Pro UI Checkpoint**: It's for the browser subagent to trigger browser action such as clicking, scrolling, or filling in input.
- **Gemini 2.5 Flash**: For checkpointing and context summarization, this is used.
- **Gemini 2.5 Flash Lite**: And when it's need to make a semantic search in your code-base, this is used.
## AntiGravity Can See Your Website
This makes a big difference from traditional IDEs. AntiGravity's browser agent is taking screenshots of your pages when it needs to check. This is achieved by a Chrome Extension as a tool to the agent, and you can also prompt the agent to take a screenshot of a page. It can iterate on website designs and implementations, it can perform UI Testing, it can monitor dashboards, it can automate routine tasks like rerunning CI.
This is the link for the extension 👉 [chromewebstore.google.com/detail/antigravity-browser-exten/eeijfnjmjelapkebgockoeaadonbchdd](https://chromewebstore.google.com/detail/antigravity-browser-exten/eeijfnjmjelapkebgockoeaadonbchdd). AntiGravity will install this extension automatically on the first run.
![Browser Extension](extension.png)
![Extension Features](extension-features.png)
## MCP Integration
### When Do We Need MCP in a Code Editor?
Simply if we want to connect to a 3rd party service to complete our task we need MCP. So AntiGravity can connect to your DB and write proper SQL queries or it can pull in recent build logs from Netlify or Heroku. Also you can ask AntiGravity to to connect GitHub for finding the best authentication pattern.
### AntiGravity Supports These MCP Servers
Airweave, AlloyDB for PostgreSQL, Atlassian, BigQuery, Cloud SQL for PostgreSQL, Cloud SQL for MySQL, Cloud SQL for SQL Server, Dart, Dataplex, Figma Dev Mode MCP, Firebase, GitHub, Harness, Heroku, Linear, Locofy, Looker, MCP Toolbox for Databases, MongoDB, Neon, Netlify, Notion, PayPal, Perplexity Ask, Pinecone, Prisma, Redis, Sequential Thinking, SonarQube, Spanner, Stripe and Supabase.
![MCP](mcp.png)
## Agent Settings ⚙️
The major settings of Agent are:
- **Agent Auto Fix Lints**: I enabled this setting because I want the Agent automatically fixes its own mistakes for invalid syntax, bad formatting, unused variables, unreachable code or following coding standards... It makes extra tool calls that's why little bit expensive 🥴.
- **Auto Execution**: Sometimes Agent tries to build application or writing test code and running it, in these cases it executes command. I choose "Turbo" 🤜 With this option, Agent always runs the terminal command and controls my browser.
- **Review Policy**: How much control you are giving to agent 🙎. I choose "Always Proceed" 👌 because I mostly trust AI 😀. The Agent will never ask for review.
![Agent Settings](agent-settings.png)
## Differences Between Cursor and AntiGravity
While Cursor was the champion of AI code editors, **Antigravity brings a different philosophy**.
### 1. "Agent-First 🤖" vs "You-First 🤠"
- **Cursor:** It acts like an assistant; it predicts your next move, auto-completes your thoughts, and helps you refactor while you type. You are still the driver; Cursor just drives the car at 200 km/h.
- **Antigravity:** Antigravity is built to let you manage coding tasks. It is "Agent-First." You don't just type code; you assign tasks to autonomous agents (e.g., "Fix the bug in the login flow and verify it in the browser"). It behaves more like a junior developer that you supervise.
### 2. The Interface
- **Cursor:** Looks and feels exactly like **VS Code**. If you know VS Code, you know Cursor.
- **Antigravity:** Introduces 2 major layouts:
- **Editor View:** Similar to a standard IDE
- **Manager View:** A dashboard where you see multiple "Agents" working in parallel. You can watch them plan, execute, and test tasks asynchronously.
### 3. Verification & Trust
- **Cursor:** You verify by reading the code diffs it suggests.
- **Antigravity:** Introduces **Artifacts**... Since the agents work autonomously, they generate proof-of-work documents, screenshots of the app running, browser logs and execution plans. So you can verify what they did without necessarily reading every line of code immediately.
### 4. Capabilities
- **Cursor:** Best-in-class **Autocomplete** ("Tab" feature) and **Composer** (multi-file editing). It excels at "Vibe Coding". It's getting into a flow state where the AI writes the boilerplate and you direct the logic.
- **Antigravity:** Is good at **Autonomous Execution**. It has a built-in browser and terminal that the *Agent* controls. The Agent can write code, run the server, open the browser, see the error, and fix it 😎
### 5. AI Models (Brains 🧠)
- **Cursor:** Model Agnostic. You can switch between **Claude 3.5 Sonnet** *-mostly the community uses this-*, GPT-4o, and others.
- **Antigravity:** Built deeply around **Gemini 3 Pro**. It leverages Gemini's massive context window (1M+ tokens) to understand huge mono repos without needing as much "RAG" as Cursor.
## Try It Yourself Now 🤝
If you are ready to experience the new AI code editor by Google, download and use 👇
[**Launch Google AntiGravity**](https://antigravity.google/)

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/agent-settings.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/anti-gravity-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/breakpoint.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/cover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/csharp-debug-extension.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/debug.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/errors.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/extension-features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/extension.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/find-website-port.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/image-20251123185724281.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/llms.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/mcp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

BIN
docs/en/Community-Articles/2025-11-21-AntiGravity/pricing.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/coverimage.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

114
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/chat-history-hybrid.svg

@ -0,0 +1,114 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 450">
<!-- Background -->
<rect width="800" height="450" fill="#f8f9fa"/>
<!-- Title -->
<text x="400" y="30" font-family="Arial" font-size="18" font-weight="bold" text-anchor="middle" fill="#0066cc">
Hybrid Chat History: Truncation + RAG on History
</text>
<!-- Full conversation -->
<rect x="50" y="60" width="250" height="200" fill="#e3f2fd" stroke="#1976d2" stroke-width="2" rx="5"/>
<text x="175" y="85" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#0d47a1">
Full Chat History
</text>
<text x="175" y="105" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
(100 messages, 20K tokens)
</text>
<!-- Messages visual -->
<rect x="60" y="120" width="230" height="15" fill="#90caf9" stroke="#1976d2" stroke-width="1" rx="2"/>
<text x="175" y="131" font-family="Arial" font-size="9" text-anchor="middle" fill="#0d47a1">Messages 1-10 (1 day ago)</text>
<rect x="60" y="140" width="230" height="15" fill="#90caf9" stroke="#1976d2" stroke-width="1" rx="2"/>
<text x="175" y="151" font-family="Arial" font-size="9" text-anchor="middle" fill="#0d47a1">Messages 11-20 (12 hours ago)</text>
<text x="175" y="175" font-family="Arial" font-size="11" text-anchor="middle" fill="#666">...</text>
<rect x="60" y="190" width="230" height="15" fill="#90caf9" stroke="#1976d2" stroke-width="1" rx="2"/>
<text x="175" y="201" font-family="Arial" font-size="9" text-anchor="middle" fill="#0d47a1">Messages 81-90</text>
<rect x="60" y="210" width="230" height="35" fill="#64b5f6" stroke="#1976d2" stroke-width="2" rx="2"/>
<text x="175" y="230" font-family="Arial" font-size="10" font-weight="bold" text-anchor="middle" fill="#0d47a1">Messages 91-100 (Last 10)</text>
<!-- Arrow split -->
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#333"/>
</marker>
</defs>
<line x1="300" y1="150" x2="370" y2="100" stroke="#d32f2f" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="300" y1="227" x2="370" y2="250" stroke="#388e3c" stroke-width="2" marker-end="url(#arrow)"/>
<text x="310" y="130" font-family="Arial" font-size="10" fill="#d32f2f">Old Messages</text>
<text x="310" y="270" font-family="Arial" font-size="10" fill="#388e3c">Recent Messages</text>
<!-- Vector DB (Long-term memory) -->
<rect x="370" y="60" width="180" height="100" fill="#ffebee" stroke="#d32f2f" stroke-width="2" rx="5"/>
<text x="460" y="85" font-family="Arial" font-size="12" font-weight="bold" text-anchor="middle" fill="#b71c1c">
Vector DB
</text>
<text x="460" y="105" font-family="Arial" font-size="10" text-anchor="middle" fill="#b71c1c">
(Long-term Memory)
</text>
<text x="460" y="125" font-family="Arial" font-size="9" text-anchor="middle" fill="#b71c1c">
Messages 1-90 with embeddings
</text>
<text x="460" y="140" font-family="Arial" font-size="9" text-anchor="middle" fill="#b71c1c">
Tool: SearchChatHistory()
</text>
<!-- Short-term memory (Prompt) -->
<rect x="370" y="200" width="180" height="100" fill="#c8e6c9" stroke="#388e3c" stroke-width="2" rx="5"/>
<text x="460" y="225" font-family="Arial" font-size="12" font-weight="bold" text-anchor="middle" fill="#1b5e20">
Prompt (Short-term)
</text>
<text x="460" y="245" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">
Messages 91-100
</text>
<text x="460" y="265" font-family="Arial" font-size="9" text-anchor="middle" fill="#1b5e20">
Truncation (Last 10 messages)
</text>
<text x="460" y="280" font-family="Arial" font-size="9" text-anchor="middle" fill="#1b5e20">
Low tokens, fast
</text>
<!-- LLM -->
<line x1="550" y1="110" x2="600" y2="180" stroke="#666" stroke-width="2" stroke-dasharray="5,5" marker-end="url(#arrow)"/>
<line x1="550" y1="250" x2="600" y2="210" stroke="#666" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="600" y="150" width="150" height="100" fill="#f3e5f5" stroke="#7b1fa2" stroke-width="2" rx="5"/>
<text x="675" y="185" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#4a148c">
LLM
</text>
<text x="675" y="205" font-family="Arial" font-size="10" text-anchor="middle" fill="#4a148c">
Short-term context +
</text>
<text x="675" y="220" font-family="Arial" font-size="10" text-anchor="middle" fill="#4a148c">
Long-term memory via tool
</text>
<text x="675" y="235" font-family="Arial" font-size="10" text-anchor="middle" fill="#4a148c">
access when needed
</text>
<!-- Benefits -->
<rect x="50" y="330" width="700" height="100" fill="#fff9c4" stroke="#f57f17" stroke-width="2" rx="5"/>
<text x="400" y="360" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#f57f17">
✅ Hybrid Approach Benefits
</text>
<g id="benefit1">
<circle cx="80" cy="385" r="5" fill="#fbc02d"/>
<text x="95" y="390" font-family="Arial" font-size="11" fill="#f57f17">
<tspan font-weight="bold">Low Cost:</tspan> Only last 10 messages in prompt per request (truncation)
</text>
</g>
<g id="benefit2">
<circle cx="80" cy="410" r="5" fill="#fbc02d"/>
<text x="95" y="415" font-family="Arial" font-size="11" fill="#f57f17">
<tspan font-weight="bold">High Fidelity:</tspan> LLM can access old messages via SearchChatHistory tool when needed
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

150
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/mcp-architecture.svg

@ -0,0 +1,150 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 500">
<!-- Background -->
<rect width="900" height="500" fill="#f8f9fa"/>
<!-- Title -->
<text x="450" y="30" font-family="Arial" font-size="20" font-weight="bold" text-anchor="middle" fill="#0066cc">
Model Context Protocol (MCP): Out-of-Process Tools
</text>
<!-- MCP Hosts -->
<text x="150" y="70" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#333">
MCP Hosts (Clients)
</text>
<g id="semantic-kernel-host">
<rect x="50" y="80" width="200" height="70" fill="#0078d4" stroke="#005a9e" stroke-width="2" rx="5"/>
<text x="150" y="110" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#fff">
Semantic Kernel
</text>
<text x="150" y="130" font-family="Arial" font-size="11" text-anchor="middle" fill="#fff">
(.NET Agent)
</text>
</g>
<g id="vscode-host">
<rect x="50" y="170" width="200" height="70" fill="#007acc" stroke="#005a8c" stroke-width="2" rx="5"/>
<text x="150" y="200" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#fff">
VS Code Copilot
</text>
<text x="150" y="220" font-family="Arial" font-size="11" text-anchor="middle" fill="#fff">
(.vscode/mcp.json)
</text>
</g>
<g id="claude-host">
<rect x="50" y="260" width="200" height="70" fill="#d97706" stroke="#b45309" stroke-width="2" rx="5"/>
<text x="150" y="290" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#fff">
Claude Desktop
</text>
<text x="150" y="310" font-family="Arial" font-size="11" text-anchor="middle" fill="#fff">
(Anthropic)
</text>
</g>
<!-- Arrows -->
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#333"/>
</marker>
</defs>
<line x1="250" y1="115" x2="350" y2="200" stroke="#666" stroke-width="2" stroke-dasharray="5,5" marker-end="url(#arrow)"/>
<line x1="250" y1="205" x2="350" y2="200" stroke="#666" stroke-width="2" stroke-dasharray="5,5" marker-end="url(#arrow)"/>
<line x1="250" y1="295" x2="350" y2="200" stroke="#666" stroke-width="2" stroke-dasharray="5,5" marker-end="url(#arrow)"/>
<text x="290" y="160" font-family="Arial" font-size="10" text-anchor="middle" fill="#666">
stdio/http
</text>
<text x="290" y="175" font-family="Arial" font-size="10" text-anchor="middle" fill="#666">
JSON-RPC
</text>
<!-- MCP Protocol Layer -->
<rect x="350" y="160" width="200" height="80" fill="#00c853" stroke="#00a040" stroke-width="3" rx="5"/>
<text x="450" y="190" font-family="Arial" font-size="16" font-weight="bold" text-anchor="middle" fill="#fff">
MCP Protocol
</text>
<text x="450" y="210" font-family="Arial" font-size="11" text-anchor="middle" fill="#fff">
(Standardized Interface)
</text>
<text x="450" y="225" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
ModelContextProtocol SDK
</text>
<!-- Arrows to servers -->
<line x1="550" y1="200" x2="620" y2="130" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="550" y1="200" x2="620" y2="205" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="550" y1="200" x2="620" y2="280" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
<!-- MCP Servers -->
<text x="725" y="70" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#333">
MCP Servers (Tools)
</text>
<g id="filesystem-server">
<rect x="620" y="90" width="210" height="80" fill="#9c27b0" stroke="#7b1fa2" stroke-width="2" rx="5"/>
<text x="725" y="120" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#fff">
filesystem.mcp.exe
</text>
<text x="725" y="140" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
ReadFile(), ListFiles()
</text>
<text x="725" y="155" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
(.NET Console App)
</text>
</g>
<g id="database-server">
<rect x="620" y="180" width="210" height="80" fill="#1976d2" stroke="#0d47a1" stroke-width="2" rx="5"/>
<text x="725" y="210" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#fff">
sqlserver.mcp.exe
</text>
<text x="725" y="230" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
ExecuteQuery(), GetSchema()
</text>
<text x="725" y="245" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
(.NET Console App)
</text>
</g>
<g id="github-server">
<rect x="620" y="270" width="210" height="80" fill="#333" stroke="#000" stroke-width="2" rx="5"/>
<text x="725" y="300" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#fff">
github.mcp.js
</text>
<text x="725" y="320" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
CreateIssue(), GetPR()
</text>
<text x="725" y="335" font-family="Arial" font-size="10" text-anchor="middle" fill="#fff">
(Node.js / TypeScript)
</text>
</g>
<!-- Benefits box -->
<rect x="50" y="370" width="800" height="120" fill="#e8f5e9" stroke="#388e3c" stroke-width="2" rx="5"/>
<text x="450" y="400" font-family="Arial" font-size="15" font-weight="bold" text-anchor="middle" fill="#1b5e20">
✅ MCP Benefits
</text>
<g id="benefit1">
<circle cx="80" cy="425" r="5" fill="#4caf50"/>
<text x="95" y="430" font-family="Arial" font-size="11" fill="#1b5e20">
<tspan font-weight="bold">Reusability:</tspan> Write once, use everywhere (SK, VS Code, Claude)
</text>
</g>
<g id="benefit2">
<circle cx="80" cy="450" r="5" fill="#4caf50"/>
<text x="95" y="455" font-family="Arial" font-size="11" fill="#1b5e20">
<tspan font-weight="bold">Independence:</tspan> MCP server runs separately, doesn't affect main app (out-of-process)
</text>
</g>
<g id="benefit3">
<circle cx="80" cy="475" r="5" fill="#4caf50"/>
<text x="95" y="480" font-family="Arial" font-size="11" fill="#1b5e20">
<tspan font-weight="bold">Language Agnostic:</tspan> Can be written in C#, Python, Node.js, everyone speaks same protocol
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

135
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/multilingual-rag.svg

@ -0,0 +1,135 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 400">
<!-- Background -->
<rect width="1000" height="400" fill="#f8f9fa"/>
<!-- Title -->
<text x="500" y="30" font-family="Arial" font-size="20" font-weight="bold" text-anchor="middle" fill="#0066cc">
Multilingual RAG: Query Translation Pattern
</text>
<!-- User Query (Turkish) -->
<rect x="50" y="80" width="180" height="80" fill="#fff3cd" stroke="#ffc107" stroke-width="2" rx="5"/>
<text x="140" y="110" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#856404">
User Query
</text>
<text x="140" y="130" font-family="Arial" font-size="12" text-anchor="middle" fill="#856404">
🇹🇷 "Yazıcıyı ağa
</text>
<text x="140" y="145" font-family="Arial" font-size="12" text-anchor="middle" fill="#856404">
nasıl bağlarım?"
</text>
<!-- Arrow -->
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#333"/>
</marker>
</defs>
<line x1="230" y1="120" x2="290" y2="120" stroke="#d32f2f" stroke-width="3" marker-end="url(#arrow)"/>
<text x="260" y="110" font-family="Arial" font-size="11" font-weight="bold" text-anchor="middle" fill="#d32f2f">
Tool 1
</text>
<!-- Translation Tool -->
<rect x="290" y="80" width="180" height="80" fill="#ffccbc" stroke="#d84315" stroke-width="2" rx="5"/>
<text x="380" y="105" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#bf360c">
TranslationPlugin
</text>
<text x="380" y="125" font-family="Arial" font-size="11" text-anchor="middle" fill="#bf360c">
TranslateText()
</text>
<text x="380" y="145" font-family="Arial" font-size="10" text-anchor="middle" fill="#bf360c">
Target: English
</text>
<!-- Translated Query (English) -->
<line x1="470" y1="120" x2="530" y2="120" stroke="#388e3c" stroke-width="3" marker-end="url(#arrow)"/>
<text x="500" y="110" font-family="Arial" font-size="11" font-weight="bold" text-anchor="middle" fill="#1b5e20">
Tool 2
</text>
<rect x="530" y="80" width="180" height="80" fill="#c8e6c9" stroke="#388e3c" stroke-width="2" rx="5"/>
<text x="620" y="110" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#1b5e20">
RAGPlugin
</text>
<text x="620" y="130" font-family="Arial" font-size="11" text-anchor="middle" fill="#1b5e20">
🇬🇧 "How do I connect
</text>
<text x="620" y="145" font-family="Arial" font-size="11" text-anchor="middle" fill="#1b5e20">
the printer to network?"
</text>
<!-- Vector DB -->
<line x1="710" y1="120" x2="770" y2="220" stroke="#1976d2" stroke-width="2" stroke-dasharray="5,5" marker-end="url(#arrow)"/>
<text x="740" y="170" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
Vector Search
</text>
<rect x="770" y="220" width="180" height="80" fill="#e3f2fd" stroke="#1976d2" stroke-width="2" rx="5"/>
<text x="860" y="245" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#0d47a1">
Vector DB
</text>
<text x="860" y="265" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
(English Docs)
</text>
<text x="860" y="280" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
"Navigate to Settings
</text>
<text x="860" y="292" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
&gt; Network &gt; Wi-Fi..."
</text>
<!-- Retrieved Context -->
<line x1="770" y1="260" x2="710" y2="260" stroke="#1976d2" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="530" y="220" width="180" height="80" fill="#bbdefb" stroke="#1976d2" stroke-width="2" rx="5"/>
<text x="620" y="245" font-family="Arial" font-size="12" font-weight="bold" text-anchor="middle" fill="#0d47a1">
Retrieved Context
</text>
<text x="620" y="265" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
🇬🇧 English text
</text>
<text x="620" y="280" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">
(Manual excerpt)
</text>
<!-- Arrow to LLM -->
<line x1="530" y1="260" x2="470" y2="260" stroke="#9c27b0" stroke-width="3" marker-end="url(#arrow)"/>
<!-- LLM Final Generation -->
<rect x="290" y="220" width="180" height="80" fill="#f3e5f5" stroke="#7b1fa2" stroke-width="2" rx="5"/>
<text x="380" y="245" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#4a148c">
LLM (GPT-5)
</text>
<text x="380" y="265" font-family="Arial" font-size="10" text-anchor="middle" fill="#4a148c">
Context: [English]
</text>
<text x="380" y="280" font-family="Arial" font-size="10" text-anchor="middle" fill="#4a148c">
Generates: [Turkish Response]
</text>
<!-- Arrow to user -->
<line x1="290" y1="260" x2="230" y2="260" stroke="#9c27b0" stroke-width="3" marker-end="url(#arrow)"/>
<!-- Final Answer -->
<rect x="50" y="220" width="180" height="80" fill="#e1bee7" stroke="#7b1fa2" stroke-width="2" rx="5"/>
<text x="140" y="245" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#4a148c">
Response to User
</text>
<text x="140" y="265" font-family="Arial" font-size="11" text-anchor="middle" fill="#4a148c">
🇹🇷 "Ayarlar &gt;&gt;
</text>
<text x="140" y="280" font-family="Arial" font-size="11" text-anchor="middle" fill="#4a148c">
Wi-Fi bölümüne gidin..."
</text>
<!-- Benefit note -->
<rect x="50" y="320" width="900" height="60" fill="#fff9c4" stroke="#f57f17" stroke-width="2" rx="5"/>
<text x="500" y="345" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#f57f17">
✅ Benefit: Single language (English) docs, multi-language query support
</text>
<text x="500" y="365" font-family="Arial" font-size="11" text-anchor="middle" fill="#f57f17">
Tool Chain: TranslationPlugin → RAGPlugin → LLM Final Generation (Original language)
</text>
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

112
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/pgvector-integration.svg

@ -0,0 +1,112 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 950 400">
<!-- Background -->
<rect width="950" height="400" fill="#f8f9fa"/>
<!-- Title -->
<text x="475" y="30" font-family="Arial" font-size="20" font-weight="bold" text-anchor="middle" fill="#0066cc">
PostgreSQL + pgvector: Integrated RAG with EF Core
</text>
<!-- .NET App -->
<rect x="50" y="80" width="200" height="80" fill="#0078d4" stroke="#005a9e" stroke-width="2" rx="5"/>
<text x="150" y="115" font-family="Arial" font-size="16" font-weight="bold" text-anchor="middle" fill="#fff">
.NET Application
</text>
<text x="150" y="135" font-family="Arial" font-size="12" text-anchor="middle" fill="#fff">
(EF Core DbContext)
</text>
<!-- Arrow -->
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#333"/>
</marker>
</defs>
<line x1="250" y1="120" x2="330" y2="120" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
<text x="290" y="110" font-family="Arial" font-size="11" text-anchor="middle" fill="#666">
LINQ Query
</text>
<!-- Pgvector.EntityFrameworkCore -->
<rect x="330" y="80" width="240" height="80" fill="#00c853" stroke="#00a040" stroke-width="3" rx="5"/>
<text x="450" y="110" font-family="Arial" font-size="15" font-weight="bold" text-anchor="middle" fill="#fff">
Pgvector.EntityFrameworkCore
</text>
<text x="450" y="130" font-family="Arial" font-size="11" text-anchor="middle" fill="#fff">
CosineDistance(), L2Distance()
</text>
<text x="450" y="145" font-family="Arial" font-size="11" text-anchor="middle" fill="#fff">
EF Core Extensions
</text>
<!-- Arrow -->
<line x1="570" y1="120" x2="650" y2="120" stroke="#333" stroke-width="2" marker-end="url(#arrow)"/>
<text x="610" y="110" font-family="Arial" font-size="11" text-anchor="middle" fill="#666">
SQL Query
</text>
<!-- PostgreSQL -->
<rect x="650" y="60" width="250" height="120" fill="#336791" stroke="#1a4a6d" stroke-width="2" rx="5"/>
<text x="775" y="95" font-family="Arial" font-size="16" font-weight="bold" text-anchor="middle" fill="#fff">
PostgreSQL + pgvector
</text>
<!-- Table visualization -->
<g id="table">
<rect x="670" y="110" width="210" height="60" fill="#4a7ba7" stroke="#fff" stroke-width="1" rx="3"/>
<!-- Header -->
<text x="685" y="127" font-family="Arial" font-size="10" font-weight="bold" fill="#fff">id</text>
<text x="725" y="127" font-family="Arial" font-size="10" font-weight="bold" fill="#fff">content</text>
<text x="800" y="127" font-family="Arial" font-size="10" font-weight="bold" fill="#fff">embedding</text>
<!-- Rows -->
<line x1="670" y1="130" x2="880" y2="130" stroke="#fff" stroke-width="1"/>
<text x="685" y="145" font-family="Arial" font-size="9" fill="#fff">1</text>
<text x="725" y="145" font-family="Arial" font-size="9" fill="#fff">Contoso...</text>
<text x="800" y="145" font-family="Arial" font-size="9" fill="#fff">[0.2, -0.1,...]</text>
<text x="685" y="160" font-family="Arial" font-size="9" fill="#fff">2</text>
<text x="725" y="160" font-family="Arial" font-size="9" fill="#fff">Revenue...</text>
<text x="800" y="160" font-family="Arial" font-size="9" fill="#fff">[0.5, 0.3,...]</text>
</g>
<!-- Benefits Box -->
<rect x="50" y="220" width="850" height="150" fill="#e8f5e9" stroke="#388e3c" stroke-width="2" rx="5"/>
<text x="475" y="250" font-family="Arial" font-size="16" font-weight="bold" text-anchor="middle" fill="#1b5e20">
✅ Benefits
</text>
<g id="benefit1">
<circle cx="80" cy="275" r="5" fill="#4caf50"/>
<text x="95" y="280" font-family="Arial" font-size="12" fill="#1b5e20">
<tspan font-weight="bold">Existing SQL Knowledge:</tspan> PostgreSQL is already a familiar database
</text>
</g>
<g id="benefit2">
<circle cx="80" cy="300" r="5" fill="#4caf50"/>
<text x="95" y="305" font-family="Arial" font-size="12" fill="#1b5e20">
<tspan font-weight="bold">EF Core Integration:</tspan> Vector queries with LINQ (.OrderBy(), .Where())
</text>
</g>
<g id="benefit3">
<circle cx="80" cy="325" r="5" fill="#4caf50"/>
<text x="95" y="330" font-family="Arial" font-size="12" fill="#1b5e20">
<tspan font-weight="bold">Metadata JOIN:</tspan> Vector + Relational data in same query (tenant_id, user_id...)
</text>
</g>
<g id="benefit4">
<circle cx="80" cy="350" r="5" fill="#4caf50"/>
<text x="95" y="355" font-family="Arial" font-size="12" fill="#1b5e20">
<tspan font-weight="bold">ACID Compliant:</tspan> Transaction support (rollback, commit)
</text>
</g>
<!-- Code Example Box -->
<rect x="50" y="390" width="850" height="10" fill="none" stroke="none"/>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

118
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/rag-parent-child.svg

@ -0,0 +1,118 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 500">
<!-- Background -->
<rect width="1000" height="500" fill="#f8f9fa"/>
<!-- Title -->
<text x="500" y="30" font-family="Arial" font-size="20" font-weight="bold" text-anchor="middle" fill="#0066cc">
Parent-Child RAG Pattern: Search Small, Respond Large
</text>
<!-- Original Document -->
<rect x="50" y="60" width="180" height="200" fill="#e3f2fd" stroke="#1976d2" stroke-width="2" rx="5"/>
<text x="140" y="85" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#0d47a1">Original Document</text>
<!-- Parent chunks -->
<rect x="60" y="100" width="160" height="50" fill="#90caf9" stroke="#1976d2" stroke-width="1" rx="3"/>
<text x="140" y="125" font-family="Arial" font-size="11" text-anchor="middle" fill="#0d47a1">Parent 1 (800 token)</text>
<rect x="60" y="160" width="160" height="50" fill="#90caf9" stroke="#1976d2" stroke-width="1" rx="3"/>
<text x="140" y="185" font-family="Arial" font-size="11" text-anchor="middle" fill="#0d47a1">Parent 2 (800 token)</text>
<rect x="60" y="220" width="160" height="30" fill="#90caf9" stroke="#1976d2" stroke-width="1" rx="3"/>
<text x="140" y="237" font-family="Arial" font-size="11" text-anchor="middle" fill="#0d47a1">Parent 3...</text>
<!-- Arrow to Child chunks -->
<defs>
<marker id="arrowBlue" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#1976d2"/>
</marker>
<marker id="arrowGreen" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#388e3c"/>
</marker>
<marker id="arrowRed" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#d32f2f"/>
</marker>
</defs>
<line x1="230" y1="125" x2="300" y2="125" stroke="#1976d2" stroke-width="2" marker-end="url(#arrowBlue)"/>
<!-- Child Chunks (Vector DB) -->
<rect x="300" y="60" width="200" height="200" fill="#c8e6c9" stroke="#388e3c" stroke-width="2" rx="5"/>
<text x="400" y="85" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#1b5e20">Child Chunks</text>
<text x="400" y="100" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">(In Vector DB)</text>
<!-- Child chunk items -->
<g id="child1">
<rect x="310" y="110" width="180" height="25" fill="#a5d6a7" stroke="#66bb6a" stroke-width="1" rx="3"/>
<text x="400" y="126" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">Child 1.1 (100 token) [ParentID=1]</text>
</g>
<g id="child2">
<rect x="310" y="140" width="180" height="25" fill="#a5d6a7" stroke="#66bb6a" stroke-width="1" rx="3"/>
<text x="400" y="156" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">Child 1.2 (100 token) [ParentID=1]</text>
</g>
<g id="child3">
<rect x="310" y="170" width="180" height="25" fill="#a5d6a7" stroke="#66bb6a" stroke-width="1" rx="3"/>
<text x="400" y="186" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">Child 1.3 (100 token) [ParentID=1]</text>
</g>
<g id="child4">
<rect x="310" y="200" width="180" height="25" fill="#a5d6a7" stroke="#66bb6a" stroke-width="1" rx="3"/>
<text x="400" y="216" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">Child 2.1 (100 token) [ParentID=2]</text>
</g>
<g id="child5">
<rect x="310" y="230" width="180" height="20" fill="#a5d6a7" stroke="#66bb6a" stroke-width="1" rx="3"/>
<text x="400" y="243" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">Child 2.2...</text>
</g>
<!-- User Query -->
<rect x="50" y="320" width="180" height="80" fill="#fff3cd" stroke="#ffc107" stroke-width="2" rx="5"/>
<text x="140" y="345" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#856404">User Query</text>
<text x="140" y="365" font-family="Arial" font-size="11" text-anchor="middle" fill="#856404">"What was Contoso's</text>
<text x="140" y="380" font-family="Arial" font-size="11" text-anchor="middle" fill="#856404">2024 revenue?"</text>
<!-- Arrow to Vector Search -->
<line x1="230" y1="360" x2="300" y2="200" stroke="#388e3c" stroke-width="2" stroke-dasharray="5,5" marker-end="url(#arrowGreen)"/>
<text x="265" y="270" font-family="Arial" font-size="11" fill="#1b5e20">1. Vector Search</text>
<text x="265" y="285" font-family="Arial" font-size="11" fill="#1b5e20">(On Child chunks)</text>
<!-- Best Match -->
<rect x="520" y="150" width="180" height="60" fill="#ffccbc" stroke="#ff5722" stroke-width="2" rx="5"/>
<text x="610" y="175" font-family="Arial" font-size="12" font-weight="bold" text-anchor="middle" fill="#bf360c">Best Match</text>
<text x="610" y="195" font-family="Arial" font-size="10" text-anchor="middle" fill="#bf360c">Child 1.2 (Score: 0.95)</text>
<line x1="500" y1="152" x2="520" y2="180" stroke="#ff5722" stroke-width="2" marker-end="url(#arrowRed)"/>
<!-- Arrow to Parent Retrieval -->
<line x1="700" y1="180" x2="750" y2="180" stroke="#d32f2f" stroke-width="2" marker-end="url(#arrowRed)"/>
<text x="690" y="230" font-family="Arial" font-size="11" fill="#b71c1c">2. Fetch Parent via</text>
<text x="690" y="240" font-family="Arial" font-size="11" fill="#b71c1c">ParentID</text>
<!-- Retrieved Parent -->
<rect x="750" y="140" width="200" height="80" fill="#ffebee" stroke="#d32f2f" stroke-width="3" rx="5"/>
<text x="850" y="165" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#b71c1c">Retrieved Parent Chunk</text>
<text x="850" y="185" font-family="Arial" font-size="10" text-anchor="middle" fill="#b71c1c">Parent 1 (800 tokens)</text>
<text x="850" y="200" font-family="Arial" font-size="10" text-anchor="middle" fill="#b71c1c">Full context + details</text>
<!-- Arrow to LLM -->
<line x1="850" y1="220" x2="850" y2="290" stroke="#0066cc" stroke-width="2" marker-end="url(#arrowBlue)"/>
<text x="880" y="255" font-family="Arial" font-size="11" fill="#0d47a1">3. Send to LLM</text>
<!-- LLM Response -->
<rect x="750" y="290" width="200" height="100" fill="#e3f2fd" stroke="#1976d2" stroke-width="3" rx="5"/>
<text x="850" y="320" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#0d47a1">LLM Response</text>
<text x="850" y="340" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">"Contoso's 2024</text>
<text x="850" y="355" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">revenue was $2.5 billion</text>
<text x="850" y="370" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">as reported."</text>
<!-- Benefit Box -->
<rect x="50" y="430" width="900" height="60" fill="#d1f2eb" stroke="#00695c" stroke-width="2" rx="5"/>
<text x="500" y="455" font-family="Arial" font-size="13" font-weight="bold" text-anchor="middle" fill="#004d40">
✅ Benefit: Precise search (Child) + Rich context (Parent) = Optimal quality
</text>
<text x="500" y="475" font-family="Arial" font-size="11" text-anchor="middle" fill="#004d40">
Alternative: Only large chunks → Lower precision | Only small chunks → Insufficient context
</text>
</svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

60
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/reasoning-effort-diagram.svg

@ -0,0 +1,60 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 300">
<!-- Background -->
<rect width="800" height="300" fill="#f8f9fa"/>
<!-- Title -->
<text x="400" y="30" font-family="Arial" font-size="20" font-weight="bold" text-anchor="middle" fill="#0066cc">
ReasoningEffortLevel: Cost vs Quality
</text>
<!-- Axis -->
<line x1="50" y1="250" x2="750" y2="250" stroke="#333" stroke-width="2"/>
<line x1="50" y1="250" x2="50" y2="50" stroke="#333" stroke-width="2"/>
<!-- Y-axis labels -->
<text x="40" y="60" font-family="Arial" font-size="12" text-anchor="end" fill="#666">High</text>
<text x="40" y="155" font-family="Arial" font-size="12" text-anchor="end" fill="#666">Medium</text>
<text x="40" y="250" font-family="Arial" font-size="12" text-anchor="end" fill="#666">Low</text>
<!-- Y-axis title -->
<text x="20" y="150" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#333" transform="rotate(-90 20 150)">
Quality / Cost
</text>
<!-- Effort levels -->
<g id="minimal">
<rect x="100" y="200" width="120" height="50" fill="#90caf9" stroke="#1976d2" stroke-width="2" rx="5"/>
<text x="160" y="225" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#0d47a1">Minimal</text>
<text x="160" y="242" font-family="Arial" font-size="10" text-anchor="middle" fill="#0d47a1">Fast + Cheap</text>
</g>
<g id="low">
<rect x="250" y="170" width="120" height="80" fill="#81c784" stroke="#388e3c" stroke-width="2" rx="5"/>
<text x="310" y="205" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#1b5e20">Low</text>
<text x="310" y="222" font-family="Arial" font-size="10" text-anchor="middle" fill="#1b5e20">Simple Queries</text>
</g>
<g id="medium">
<rect x="400" y="120" width="120" height="130" fill="#ffb74d" stroke="#f57c00" stroke-width="2" rx="5"/>
<text x="460" y="175" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#e65100">Medium</text>
<text x="460" y="192" font-family="Arial" font-size="10" text-anchor="middle" fill="#e65100">Standard</text>
</g>
<g id="high">
<rect x="550" y="60" width="120" height="190" fill="#e57373" stroke="#d32f2f" stroke-width="2" rx="5"/>
<text x="610" y="145" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#b71c1c">High</text>
<text x="610" y="162" font-family="Arial" font-size="10" text-anchor="middle" fill="#b71c1c">Complex</text>
<text x="610" y="179" font-family="Arial" font-size="10" text-anchor="middle" fill="#b71c1c">Coding</text>
</g>
<!-- Cost arrow -->
<defs>
<marker id="arrowhead" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#d32f2f"/>
</marker>
</defs>
<line x1="150" y1="270" x2="650" y2="270" stroke="#d32f2f" stroke-width="2" marker-end="url(#arrowhead)"/>
<text x="400" y="290" font-family="Arial" font-size="12" font-style="italic" text-anchor="middle" fill="#d32f2f">
Increasing Cost (Reasoning Tokens ↑)
</text>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

149
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/images/svg-diagram-example.svg

@ -0,0 +1,149 @@
<svg viewBox="0 0 800 400" xmlns="http://www.w3.org/2000/svg">
<!-- Background -->
<rect width="800" height="400" fill="#f0f4f8"/>
<!-- Title -->
<text x="400" y="30" font-family="Arial, sans-serif" font-size="20" font-weight="bold" fill="#1e3a8a" text-anchor="middle">
PostgreSQL + pgvector Architecture
</text>
<!-- .NET Application -->
<g id="dotnet-app">
<rect x="50" y="80" width="140" height="240" rx="10" fill="#3b82f6" stroke="#1e40af" stroke-width="2"/>
<text x="120" y="110" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="white" text-anchor="middle">
.NET Application
</text>
<!-- API Layer -->
<rect x="65" y="130" width="110" height="50" rx="5" fill="#60a5fa" stroke="#2563eb" stroke-width="1.5"/>
<text x="120" y="160" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Web API /
</text>
<text x="120" y="175" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Controllers
</text>
<!-- Business Logic -->
<rect x="65" y="190" width="110" height="50" rx="5" fill="#60a5fa" stroke="#2563eb" stroke-width="1.5"/>
<text x="120" y="215" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Business Logic /
</text>
<text x="120" y="230" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Services
</text>
<!-- Data Layer -->
<rect x="65" y="250" width="110" height="50" rx="5" fill="#60a5fa" stroke="#2563eb" stroke-width="1.5"/>
<text x="120" y="275" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Data Access
</text>
<text x="120" y="290" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Layer
</text>
</g>
<!-- Arrow 1: .NET to EF Core -->
<defs>
<marker id="arrowblue" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L9,3 z" fill="#1e40af" />
</marker>
</defs>
<line x1="190" y1="200" x2="260" y2="200" stroke="#1e40af" stroke-width="3" marker-end="url(#arrowblue)"/>
<text x="225" y="190" font-family="Arial, sans-serif" font-size="11" fill="#1e3a8a" text-anchor="middle">ORM</text>
<!-- EF Core -->
<g id="ef-core">
<rect x="260" y="150" width="140" height="100" rx="10" fill="#2563eb" stroke="#1e40af" stroke-width="2"/>
<text x="330" y="180" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="white" text-anchor="middle">
Entity Framework
</text>
<text x="330" y="200" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="white" text-anchor="middle">
Core
</text>
<text x="330" y="225" font-family="Arial, sans-serif" font-size="12" fill="#bfdbfe" text-anchor="middle">
DbContext
</text>
<text x="330" y="240" font-family="Arial, sans-serif" font-size="12" fill="#bfdbfe" text-anchor="middle">
LINQ Queries
</text>
</g>
<!-- Arrow 2: EF Core to PostgreSQL -->
<line x1="400" y1="200" x2="470" y2="200" stroke="#1e40af" stroke-width="3" marker-end="url(#arrowblue)"/>
<text x="435" y="190" font-family="Arial, sans-serif" font-size="11" fill="#1e3a8a" text-anchor="middle">Npgsql</text>
<!-- PostgreSQL -->
<g id="postgresql">
<rect x="470" y="80" width="140" height="240" rx="10" fill="#1e40af" stroke="#1e3a8a" stroke-width="2"/>
<text x="540" y="110" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="white" text-anchor="middle">
PostgreSQL
</text>
<!-- Tables -->
<rect x="485" y="130" width="110" height="50" rx="5" fill="#3b82f6" stroke="#2563eb" stroke-width="1.5"/>
<text x="540" y="155" font-family="Arial, sans-serif" font-size="13" fill="white" text-anchor="middle">
Relational Tables
</text>
<text x="540" y="170" font-family="Arial, sans-serif" font-size="11" fill="#bfdbfe" text-anchor="middle">
(Standard Data)
</text>
<!-- pgvector Extension -->
<rect x="485" y="190" width="110" height="50" rx="5" fill="#60a5fa" stroke="#3b82f6" stroke-width="1.5"/>
<text x="540" y="215" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="white" text-anchor="middle">
pgvector
</text>
<text x="540" y="230" font-family="Arial, sans-serif" font-size="11" fill="white" text-anchor="middle">
Vector Storage
</text>
<!-- Vector Search -->
<rect x="485" y="250" width="110" height="50" rx="5" fill="#93c5fd" stroke="#60a5fa" stroke-width="1.5"/>
<text x="540" y="270" font-family="Arial, sans-serif" font-size="12" fill="#1e3a8a" text-anchor="middle">
Vector Search
</text>
<text x="540" y="285" font-family="Arial, sans-serif" font-size="11" fill="#1e40af" text-anchor="middle">
Similarity Queries
</text>
<text x="540" y="297" font-family="Arial, sans-serif" font-size="10" fill="#1e40af" text-anchor="middle">
(&lt;=&gt;, &lt;-&gt;, &lt;#&gt;)
</text>
</g>
<!-- Arrow 3: Vector Operations -->
<path d="M 540 240 L 540 250" stroke="#1e40af" stroke-width="2" marker-end="url(#arrowblue)"/>
<!-- Vector Search Results -->
<g id="results">
<rect x="640" y="160" width="130" height="80" rx="8" fill="#dbeafe" stroke="#3b82f6" stroke-width="2" stroke-dasharray="5,5"/>
<text x="705" y="185" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#1e40af" text-anchor="middle">
Search Results
</text>
<text x="705" y="205" font-family="Arial, sans-serif" font-size="11" fill="#1e40af" text-anchor="middle">
• Embeddings
</text>
<text x="705" y="220" font-family="Arial, sans-serif" font-size="11" fill="#1e40af" text-anchor="middle">
• Similarity Score
</text>
<text x="705" y="235" font-family="Arial, sans-serif" font-size="11" fill="#1e40af" text-anchor="middle">
• Ranked Results
</text>
</g>
<!-- Arrow to Results -->
<line x1="610" y1="200" x2="640" y2="200" stroke="#3b82f6" stroke-width="2" marker-end="url(#arrowblue)" stroke-dasharray="5,5"/>
<!-- Legend -->
<g id="legend">
<text x="50" y="360" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#1e3a8a">
Data Flow:
</text>
<text x="50" y="380" font-family="Arial, sans-serif" font-size="11" fill="#334155">
1. .NET → EF Core → PostgreSQL (Data Operations)
</text>
<text x="420" y="380" font-family="Arial, sans-serif" font-size="11" fill="#334155">
2. Vector Similarity Search with pgvector
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

414
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/post.md

@ -0,0 +1,414 @@
# Building Production-Ready LLM Applications with .NET: A Practical Guide
Large Language Models (LLMs) have evolved rapidly, and integrating them into production .NET applications requires staying current with the latest approaches. In this article, I'll share practical tips and patterns I've learned while building LLM-powered systems, covering everything from API changes in GPT-5 to implementing efficient RAG (Retrieval Augmented Generation) architectures.
Whether you're building a chatbot, a knowledge base assistant, or integrating AI into your enterprise applications, these production-tested insights will help you avoid common pitfalls and build more reliable systems.
## The Temperature Paradigm Shift: GPT-5 Changes Everything
If you've been working with GPT-4 or earlier models, you're familiar with the `temperature` and `top_p` parameters for controlling response randomness. **Here's the critical update**: GPT-5 no longer supports these parameters!
### The Old Way (GPT-4)
```csharp
var chatRequest = new ChatOptions
{
Temperature = 0.7, // ✅ Worked with GPT-4
TopP = 0.9 // ✅ Worked with GPT-4
};
```
### The New Way (GPT-5)
```csharp
var chatRequest = new ChatOptions
{
RawRepresentationFactory = (client => new ChatCompletionOptions()
{
#pragma warning disable OPENAI001
ReasoningEffortLevel = "minimal",
#pragma warning restore OPENAI001
})
};
```
**Why the change?** GPT-5 incorporates an internal reasoning and verification process. Instead of controlling randomness, you now specify how much computational effort the model should invest in reasoning through the problem.
![Reasoning Effort Levels](images/reasoning-effort-diagram.svg)
### Choosing the Right Reasoning Level
- **Low**: Quick responses for simple queries (e.g., "What's the capital of France?")
- **Medium**: Balanced approach for most use cases
- **High**: Complex reasoning tasks (e.g., code generation, multi-step problem solving)
> **Pro Tip**: Reasoning tokens are included in your API costs. Use "High" only when necessary to optimize your budget.
## System Prompts: The "Lost in the Middle" Problem
Here's a critical insight that can save you hours of debugging: **Important rules must be repeated at the END of your prompt!**
### ❌ What Doesn't Work
```
You are a helpful assistant.
RULE: Never share passwords or sensitive information.
[User Input]
```
### ✅ What Actually Works
```
You are a helpful assistant.
RULE: Never share passwords or sensitive information.
[User Input]
⚠️ REMINDER: Apply the rules above strictly, ESPECIALLY regarding passwords.
```
**Why?** LLMs suffer from the "Lost in the Middle" phenomenon—they pay more attention to the beginning and end of the context window. Critical instructions buried in the middle are often ignored.
## RAG Architecture: The Parent-Child Pattern
Retrieval Augmented Generation (RAG) is essential for grounding LLM responses in your own data. The most effective pattern I've found is the **Parent-Child approach**.
![RAG Parent-Child Architecture](images/rag-parent-child.svg)
### How It Works
1. **Split documents into hierarchies**:
- **Parent chunks**: Large sections (1000-2000 tokens) for context
- **Child chunks**: Small segments (200-500 tokens) for precise retrieval
2. **Store both in vector database** with references
3. **Query flow**:
- Search using child chunks (higher precision)
- Return parent chunks to LLM (richer context)
### The Overlap Strategy
Always use overlapping chunks to prevent information loss at boundaries!
```
Chunk 1: Token 0-500
Chunk 2: Token 400-900 ← 100 token overlap
Chunk 3: Token 800-1300 ← 100 token overlap
```
**Standard recommendation**: 10-20% overlap (for 500 tokens, use 50-100 token overlap)
### Implementation with Semantic Kernel
```csharp
using Microsoft.SemanticKernel.Text;
var chunks = TextChunker.SplitPlainTextParagraphs(
documentText,
maxTokensPerParagraph: 500,
overlapTokens: 50
);
foreach (var chunk in chunks)
{
var embedding = await embeddingService.GenerateEmbeddingAsync(chunk);
await vectorDb.StoreAsync(chunk, embedding);
}
```
## PostgreSQL + pgvector: The Pragmatic Choice
For .NET developers, choosing a vector database can be overwhelming. After evaluating multiple options, **PostgreSQL with pgvector** is the most practical choice for most scenarios.
![pgvector Integration](images/pgvector-integration.svg)
### Why pgvector?
**Use existing SQL knowledge** - No new query language to learn
**EF Core integration** - Works with your existing data access layer
**JOIN with metadata** - Combine vector search with traditional queries
**WHERE clause filtering** - Filter by tenant, user, date, etc.
**ACID compliance** - Transaction support for data consistency
**No separate infrastructure** - One database for everything
### Setting Up pgvector with EF Core
First, install the NuGet package:
```bash
dotnet add package Pgvector.EntityFrameworkCore
```
Define your entity:
```csharp
using Pgvector;
using Pgvector.EntityFrameworkCore;
public class DocumentChunk
{
public Guid Id { get; set; }
public string Content { get; set; }
public Vector Embedding { get; set; } // 👈 pgvector type
public Guid ParentChunkId { get; set; }
public DateTime CreatedAt { get; set; }
}
```
Configure in DbContext:
```csharp
protected override void OnModelCreating(ModelBuilder builder)
{
builder.HasPostgresExtension("vector");
builder.Entity<DocumentChunk>()
.Property(e => e.Embedding)
.HasColumnType("vector(1536)"); // 👈 OpenAI embedding dimension
builder.Entity<DocumentChunk>()
.HasIndex(e => e.Embedding)
.HasMethod("hnsw") // 👈 Fast approximate search
.HasOperators("vector_cosine_ops");
}
```
### Performing Vector Search
```csharp
using Pgvector.EntityFrameworkCore;
public async Task<List<DocumentChunk>> SearchAsync(string query)
{
// 1. Convert query to embedding
var queryVector = await _embeddingService.GetEmbeddingAsync(query);
// 2. Search
return await _context.DocumentChunks
.OrderBy(c => c.Embedding.L2Distance(queryVector)) // 👈 Lower is better
.Take(5)
.ToListAsync();
}
```
**Source**: [Pgvector.NET on GitHub](https://github.com/pgvector/pgvector-dotnet?tab=readme-ov-file#entity-framework-core)
## Smart Tool Usage: Make RAG a Tool, Not a Tax
A common mistake is calling RAG on every single user message. This wastes tokens and money. Instead, **make RAG a tool** and let the LLM decide when to use it.
### ❌ Expensive Approach
```csharp
// Always call RAG, even for "Hello"
var context = await PerformRAG(userMessage);
var response = await chatClient.CompleteAsync($"{context}\n\n{userMessage}");
```
### ✅ Smart Approach
```csharp
[KernelFunction]
[Description("Search the company knowledge base for information")]
public async Task<string> SearchKnowledgeBase(
[Description("The search query")] string query)
{
var results = await _vectorDb.SearchAsync(query);
return string.Join("\n---\n", results.Select(r => r.Content));
}
```
The LLM will call `SearchKnowledgeBase` only when needed:
- "Hello" → No tool call
- "What was our 2024 revenue?" → Calls tool
- "Tell me a joke" → No tool call
## Multilingual RAG: Query Translation Strategy
When your documents are in one language (e.g., English) but users query in another (e.g., Turkish), you need a translation strategy.
![Multilingual RAG Architecture](images/multilingual-rag.svg)
### Solution Options
**Option 1**: Use an LLM that automatically calls tools in English
- Many modern LLMs can do this if properly instructed
**Option 2**: Tool chain approach
```csharp
[KernelFunction]
[Description("Translate text to English")]
public async Task<string> TranslateToEnglish(string text)
{
// Translation logic
}
[KernelFunction]
[Description("Search knowledge base (English only)")]
public async Task<string> SearchKnowledgeBase(string englishQuery)
{
// Search logic
}
```
The LLM will:
1. Call `TranslateToEnglish("2024 geliri nedir?")`
2. Get "What was 2024 revenue?"
3. Call `SearchKnowledgeBase("What was 2024 revenue?")`
4. Return results and respond in Turkish
## Model Context Protocol (MCP): Beyond In-Process Tools
Microsoft and Anthropic recently released official C# SDKs for the Model Context Protocol (MCP). This is a game-changer for tool reusability.
![MCP Architecture](images/mcp-architecture.svg)
### MCP vs. Semantic Kernel Plugins
| Feature | SK Plugins | MCP Servers |
|---------|-----------|-------------|
| **Process** | In-process | Out-of-process (stdio/http) |
| **Reusability** | Application-specific | Cross-application |
| **Examples** | Used within your app | VS Code Copilot, Claude Desktop |
### Creating an MCP Server
```csharp
using Microsoft.Extensions.Hosting;
using ModelContextProtocol.Extensions.Hosting;
var builder = Host.CreateEmptyApplicationBuilder(settings: null);
builder.Services.AddMcpServer()
.WithStdioServerTransport()
.WithToolsFromAssembly();
await builder.Build().RunAsync();
```
Define your tools:
```csharp
[McpServerToolType]
public static class FileSystemTools
{
[McpServerTool, Description("Read a file from the file system")]
public static async Task<string> ReadFile(string path)
{
// ⚠️ SECURITY: Always validate paths!
if (!IsPathSafe(path))
throw new SecurityException("Invalid path");
return await File.ReadAllTextAsync(path);
}
private static bool IsPathSafe(string path)
{
// Implement path traversal prevention
var fullPath = Path.GetFullPath(path);
return fullPath.StartsWith(AllowedDirectory);
}
}
```
Your MCP server can now be used by VS Code Copilot, Claude Desktop, or any other MCP client!
## Chat History Management: Truncation + RAG Hybrid
For long conversations, storing all history in the context window becomes impractical. Here's the pattern that works:
![Chat History Hybrid Strategy](images/chat-history-hybrid.svg)
### ❌ Lossy Approach
```
First 50 messages → Summarize with LLM → Single summary message
```
**Problem**: Detail loss (fidelity loss)
### ✅ Hybrid Approach
1. **Recent messages** (last 5-10): Keep in prompt for immediate context
2. **Older messages**: Store in vector database as a tool
```csharp
[KernelFunction]
[Description("Search conversation history for past discussions")]
public async Task<string> SearchChatHistory(
[Description("What to search for")] string query)
{
var relevantMessages = await _vectorDb.SearchAsync(query);
return string.Join("\n", relevantMessages.Select(m =>
$"[{m.Timestamp}] {m.Role}: {m.Content}"));
}
```
The LLM retrieves only relevant past context when needed, avoiding summary-induced information loss.
## RAG vs. Fine-Tuning: Choose Wisely
A common misconception is using fine-tuning for knowledge injection. Here's when to use each:
| Purpose | RAG | Fine-Tuning |
|---------|-----|-------------|
| **Goal** | Memory (provide facts) | Behavior (teach style) |
| **Updates** | Dynamic (add docs anytime) | Static (requires retraining) |
| **Cost** | Low dev, higher inference | High dev, lower inference |
| **Hallucination** | Reduces | Doesn't reduce |
| **Use Case** | Company docs, FAQs | Brand voice, specific format |
**Common mistake**: "Let's fine-tune on our company documents" ❌
**Better approach**: Use RAG! ✅
Fine-tuning is for teaching the model *how* to respond, not *what* to know.
**Source**: [Oracle - RAG vs Fine-Tuning](https://www.oracle.com/artificial-intelligence/generative-ai/retrieval-augmented-generation-rag/rag-fine-tuning/)
## Bonus: Why SVG is Superior for LLM-Generated Images
When using LLMs to generate diagrams and visualizations, always request SVG format instead of PNG or JPG.
### Why SVG?
**Text-based** → LLMs produce better results
**Lower cost** → Fewer tokens than base64-encoded images
**Editable** → Easy to modify after generation
**Scalable** → Perfect quality at any size
**Version control friendly** → Works great in Git
### Example Prompt
```
Create an architecture diagram showing PostgreSQL with pgvector integration.
Format: SVG, 800x400 pixels. Show: .NET Application → EF Core → PostgreSQL → Vector Search.
Use arrows to connect stages. Color scheme: Blue tones.
```
![SVG Diagram Example](images/svg-diagram-example.svg)
All diagrams in this article were generated as SVG, resulting in excellent quality and lower token costs!
> **Pro Tip**: If you don't need photographs or complex renders, always choose SVG.
## Architecture Roadmap: Putting It All Together
Here's the recommended stack for building production LLM applications with .NET:
1. **Orchestration**: Microsoft.Extensions.AI + Semantic Kernel (when needed)
2. **Vector Database**: PostgreSQL + Pgvector.EntityFrameworkCore
3. **RAG Pattern**: Parent-Child chunks with 10-20% overlap
4. **Tools**: MCP servers for reusability
5. **Reasoning**: ReasoningEffortLevel instead of temperature
6. **Prompting**: Critical rules at the end
7. **Cost Optimization**: Make RAG a tool, not automatic
## Key Takeaways
Let me summarize the most important production tips:
1. **Temperature is gone** → Use `ReasoningEffortLevel` with GPT-5
2. **Rules at the end** → Combat "Lost in the Middle"
3. **RAG as a tool** → Reduce costs significantly
4. **Parent-Child pattern** → Search small, respond with large
5. **Always use overlap** → 10-20% is the standard
6. **pgvector for most cases** → Unless you have billions of vectors
7. **MCP for reusability** → One codebase, works everywhere
8. **SVG for diagrams** → Better results, lower cost
9. **Hybrid chat history** → Recent in prompt, old in vector DB
10. **RAG > Fine-tuning** → For knowledge, not behavior
Happy coding! 🚀

1
docs/en/Community-Articles/2025-11-22-building-production-ready-llm-applications/summary.md

@ -0,0 +1 @@
Learn how to build production-ready LLM applications with .NET. This comprehensive guide covers GPT-5 API changes, advanced RAG architectures with parent-child patterns, PostgreSQL pgvector integration, smart tool usage strategies, multilingual query handling, Model Context Protocol (MCP) for cross-application tool reusability, and chat history management techniques for enterprise applications.

60
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/POST.md

@ -0,0 +1,60 @@
# .NET Conf China 2025: Changing the World, Changing Ourselves - See You Again in Shanghai
![](./images/1.png)
.NET Conf China 2025 is an annual community event for developers, celebrating the release of .NET 10 (LTS) and the achievements of the past year in China. As an extension of .NET Conf 2025, this event brings together local tech communities, well-known companies, and open-source organizations. It has become the largest .NET online and offline conference in China, dedicated to spreading .NET technology in Chinese and fostering collaboration and exchange.
## Event Highlights: Key Topics and Takeaways
This year’s conference focused on three main themes: performance improvements, AI integration, and cross-platform development. Topics covered how to achieve performance gains while maintaining engineering quality, balancing between multi-platform consistency and native capabilities, and taking generative AI from “demo-level” to “production-ready.” On the community and ecosystem side, the event showcased the .NET Foundation’s and domestic and international companies’ progress in supporting architectures like ARM, LoongArch, and RISC-V. It also highlighted best practices in DevOps, observability, and engineering toolchains, creating a complete path from ideas to implementation.
### Opening Keynote
Scott Hanselman kicked off .NET Conf China 2025 with a video keynote, announcing that .NET 10 is now available on the official website. He framed the release around four pillars—AI, cloud-native, cross-platform, and performance—including integration with the Microsoft Agent Framework for building and orchestrating multi-agent systems in .NET/C#, industry-leading container and Kubernetes support with .NET Aspire simplifying local containerized development, a richer cross-platform desktop ecosystem (.NET MAUI, Avalonia, Uno Platform), and major performance gains such as Native AOT and single-file publishing for faster startup and easier distribution across platforms.
He underscored China’s importance as .NET’s second-largest market, with roughly 13% of users, and noted that generative AI usage in China has doubled in 2025. The local community is seeing strong momentum around ML.NET, .NET Aspire, and the C# Dev Kit in VS Code. Reflecting on his Baby Smash game written 20 years ago, which now runs cross-platform on .NET 10, he called on developers to modernize: move existing Web, WinForms, and WPF apps to the cloud, improve performance, ship as a single executable, and weave in AI capabilities.
On AI, he emphasized a human-centered stance: AI and agents should augment, not replace, developers. In the future, developers will orchestrate and govern agents, and human judgment will matter more than ever. He closed by thanking the open-source community for its many proposals and pull requests, stressing that .NET is an open-source platform built together by Microsoft and the community, and wishing everyone an inspiring conference and a joyful journey with .NET 10.
![2](./images/2.png)
### Roundtable Discussion
The roundtable discussion, titled “Empowering with AI, Breaking Through Cross-Platform Barriers, and Ecosystem Innovation,” focused on practical implementation. It explored typical paths for large models and intelligent agents in enterprises, key considerations for choosing cross-platform UI frameworks, and the evolution of these frameworks. Panelists discussed questions like: How can AI capabilities be integrated into existing business processes instead of creating an “experimental” pipeline? How should cross-platform solutions be evaluated in terms of performance, ecosystem, and team skillsets? What are the unique opportunities for domestic ecosystems in the global tech landscape? And how can community collaboration help developers quickly adopt best practices? A shared consensus emerged: in the short term, focus on running scenarios; in the long term, return to engineering fundamentals. Both toolchains and methodologies are equally important.
![](./images/21.png)
### In-Depth Sessions
The afternoon featured four breakout sessions, covering a wide range of topics with deep dives into both foundational technologies and real-world project reviews:
- **Frontend and Cross-Platform:** Focused on the progress of Avalonia, Blazor, and WebAssembly, as well as the integrated experience of .NET Aspire in multi-service applications. Speakers shared insights on reusing core logic between desktop and web, shortening cold start times with incremental compilation and resource trimming, and performance profiling and optimization in WASM scenarios.
- **AI Agents and Enterprise Adoption:** Discussed multi-agent orchestration, the MCP plugin ecosystem, and enterprise data compliance. From common pitfalls of “demo-level” AI to the “five-step method” for moving from POC to production, the session covered use cases like knowledge retrieval, process automation, intelligent customer service, and developer assistants, emphasizing evaluation metrics, prompt engineering, and monitoring governance.
- **.NET Practices and Engineering:** Focused on the latest capabilities and performance practices of EF Core, the boundaries of NativeAOT, automated testing strategies, and observability implementation. Discussions included database migration strategies, caching and concurrency control for hot paths, end-to-end tracing, and structured logging.
- **Solutions and Case Studies:** From Clean Architecture/DDD to AI-powered business evolution, topics included application modernization, SaaS transformation, and edge-cloud collaboration in AIoT. Speakers broke down modular governance, team collaboration, and release strategies for complex systems, putting “delivering value continuously” at the center stage.
![](./images/3.png)
## ABP Booth Highlights: Showcases, Conversations, and Fun
The story of ABP began with a promise to create a better starting point. From the frustration of “copy-pasting boilerplate code,” we crafted a modular, opinionated framework. We chose open source and community collaboration. We founded Volosoft to turn our vision into reality with professional tools. Today, tens of thousands of developers explore the ABP framework, and thousands of teams rely on the ABP platform to deliver production-grade .NET applications faster and more securely.
![](./images/4.png)
At .NET Conf China 2025, we brought our “developer platform built for developers” to every visitor. Our booth demonstrations started with “a production-ready skeleton from the start”: modular layered architecture, built-in authentication and authorization systems, multi-tenancy support, audit logging, and localization—all out of the box. On the frontend and backend, ABP offers diverse options like MVC, Blazor, and Angular, enabling teams to quickly implement solutions on familiar stacks while maintaining flexibility for future evolution. We also showcased how ABP integrates with containerization, CI/CD, and observability, emphasizing “engineering built into the framework, not reinvented by every team.”
![](./images/42.png)
**Interaction and Prizes:** Sharing technology should also be warm and engaging. We hosted a QR code raffle at the booth, with prizes including ABP stickers, the book *Mastering ABP Framework*, and Bluetooth headphones. Multiple rounds of raffles and group photos made the interactions more memorable. Many developers shared their ABP experiences and plans for improvement right at the booth, and a few impromptu “code walkthroughs” naturally happened. The love and joy for technology were captured in every handshake and discussion.
![](./images/41.png)
## Looking Ahead: Building the Ecosystem Together
From an open-source journey to a complete development platform for the future, we’ve always believed that developers deserve a better starting point. Around performance, intelligence, and cross-platform capabilities, we will continue investing in engineering, ecosystem collaboration, and best practice sharing. We also welcome more partners to contribute through documentation and examples, share your experiences, and submit your ideas. Together, let’s make “useful infrastructure” more stable, efficient, and business-friendly.
We look forward to exchanging ideas, sharing practices, and building the ecosystem together at the next gathering. Technology meets creativity, and the possibilities are endless. We’re on the road and waiting for you at the next event.
See you next year at .NET Conf China 2026!
![](./images/5.png)

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/21.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/41.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/42.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

BIN
docs/en/Community-Articles/2025-11-30-NET-Conf-China-2025/images/cover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/cover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

145
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/architecture-diagram.svg

@ -0,0 +1,145 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 700">
<defs>
<style>
.box { fill: #f8f9fa; stroke: #1890ff; stroke-width: 2; }
.highlight-box { fill: #e6f7ff; stroke: #1890ff; stroke-width: 3; }
.service-box { fill: #fff7e6; stroke: #fa8c16; stroke-width: 2; }
.cache-box { fill: #f0f5ff; stroke: #597ef7; stroke-width: 2; }
.event-box { fill: #f6ffed; stroke: #52c41a; stroke-width: 2; }
.text { font-family: Arial, sans-serif; font-size: 14px; fill: #333; }
.title { font-family: Arial, sans-serif; font-size: 18px; fill: #1890ff; font-weight: bold; }
.section-title { font-family: Arial, sans-serif; font-size: 14px; fill: #1890ff; font-weight: bold; }
.small-text { font-family: Arial, sans-serif; font-size: 11px; fill: #666; }
.arrow { stroke: #666; stroke-width: 2; fill: none; marker-end: url(#arrowhead); }
.dashed { stroke-dasharray: 5, 5; }
</style>
<marker id="arrowhead" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#666" />
</marker>
</defs>
<!-- Title -->
<text class="title" x="500" y="35" text-anchor="middle">AutoCache Architecture</text>
<!-- Application Layer -->
<rect class="service-box" x="50" y="80" width="250" height="140" rx="5" />
<text class="section-title" x="175" y="105" text-anchor="middle">Application Service</text>
<rect class="box" x="70" y="120" width="210" height="40" rx="3" />
<text class="text" x="175" y="143" text-anchor="middle">BookAppService</text>
<text class="small-text" x="85" y="180" fill="#fa8c16">[Cache(typeof(Book))]</text>
<text class="small-text" x="85" y="195" fill="#666">public Task&lt;BookDto&gt; GetAsync()</text>
<!-- Interceptor Layer -->
<rect class="highlight-box" x="400" y="80" width="250" height="140" rx="5" />
<text class="section-title" x="525" y="105" text-anchor="middle">Cache Interceptor</text>
<rect class="box" x="420" y="120" width="210" height="40" rx="3" />
<text class="text" x="525" y="143" text-anchor="middle">AutoCacheInterceptor</text>
<text class="small-text" x="430" y="180">• Detect [Cache] attribute</text>
<text class="small-text" x="430" y="195">• Intercept method calls</text>
<!-- Cache Manager -->
<rect class="cache-box" x="750" y="80" width="200" height="140" rx="5" />
<text class="section-title" x="850" y="105" text-anchor="middle">Cache Manager</text>
<rect class="box" x="770" y="120" width="160" height="40" rx="3" />
<text class="text" x="850" y="143" text-anchor="middle">AutoCacheManager</text>
<text class="small-text" x="775" y="180">• Generate cache keys</text>
<text class="small-text" x="775" y="195">• Store/Retrieve data</text>
<!-- Arrows between layers -->
<path class="arrow" d="M 300 150 L 400 150" />
<path class="arrow" d="M 650 150 L 750 150" />
<!-- Distributed Cache -->
<rect class="cache-box" x="750" y="270" width="200" height="100" rx="5" />
<text class="section-title" x="850" y="295" text-anchor="middle">Distributed Cache</text>
<rect class="box" x="770" y="310" width="160" height="40" rx="3" />
<text class="text" x="850" y="333" text-anchor="middle">Redis / Memory</text>
<!-- Arrow to cache -->
<path class="arrow" d="M 850 220 L 850 270" />
<text class="small-text" x="860" y="250">Get/Set</text>
<!-- Entity Domain -->
<rect class="service-box" x="50" y="270" width="250" height="100" rx="5" />
<text class="section-title" x="175" y="295" text-anchor="middle">Domain Layer</text>
<rect class="box" x="70" y="310" width="210" height="40" rx="3" />
<text class="text" x="175" y="333" text-anchor="middle">Book Entity</text>
<!-- Event Bus -->
<rect class="event-box" x="400" y="270" width="250" height="100" rx="5" />
<text class="section-title" x="525" y="295" text-anchor="middle">Event Bus</text>
<rect class="box" x="420" y="310" width="210" height="40" rx="3" />
<text class="text" x="525" y="333" text-anchor="middle">EntityChangedEvent</text>
<!-- Invalidation Handler -->
<rect class="event-box" x="750" y="420" width="200" height="100" rx="5" />
<text class="section-title" x="850" y="445" text-anchor="middle">Invalidation Handler</text>
<rect class="box" x="770" y="460" width="160" height="40" rx="3" />
<text class="text" x="850" y="483" text-anchor="middle">Clear Related Caches</text>
<!-- Key Manager -->
<rect class="cache-box" x="400" y="420" width="250" height="100" rx="5" />
<text class="section-title" x="525" y="445" text-anchor="middle">Cache Key Manager</text>
<rect class="box" x="420" y="460" width="210" height="40" rx="3" />
<text class="text" x="525" y="483" text-anchor="middle">IAutoCacheKeyManager</text>
<!-- Event flow arrows -->
<path class="arrow" d="M 175 370 L 175 400 L 525 400 L 525 370" />
<text class="small-text" x="280" y="395">Publish</text>
<path class="arrow" d="M 525 370 L 525 420" />
<text class="small-text" x="535" y="400">Handle</text>
<path class="arrow" d="M 650 470 L 750 470" />
<text class="small-text" x="675" y="465">Invalidate</text>
<path class="arrow" d="M 850 420 L 850 370" />
<text class="small-text" x="860" y="400">Remove keys</text>
<!-- Scope information -->
<rect class="box" x="50" y="420" width="250" height="100" rx="5" />
<text class="section-title" x="175" y="445" text-anchor="middle">Cache Scopes</text>
<text class="small-text" x="65" y="470">• Global - Shared by all users</text>
<text class="small-text" x="65" y="487">• CurrentUser - Per user ID</text>
<text class="small-text" x="65" y="504">• AuthenticatedUser - Auth status</text>
<!-- Flow labels -->
<text class="small-text" x="50" y="570" fill="#1890ff" font-weight="bold">① Method Call</text>
<text class="small-text" x="50" y="590" fill="#666">Application service method is called</text>
<text class="small-text" x="270" y="570" fill="#1890ff" font-weight="bold">② Intercept</text>
<text class="small-text" x="270" y="590" fill="#666">Interceptor detects [Cache] attribute</text>
<text class="small-text" x="490" y="570" fill="#1890ff" font-weight="bold">③ Check Cache</text>
<text class="small-text" x="490" y="590" fill="#666">Manager checks distributed cache</text>
<text class="small-text" x="710" y="570" fill="#1890ff" font-weight="bold">④ Invalidate</text>
<text class="small-text" x="710" y="590" fill="#666">Entity changes clear related caches</text>
<!-- Legend -->
<line x1="50" y1="640" x2="950" y2="640" stroke="#ddd" stroke-width="1" />
<rect x="50" y="655" width="20" height="15" class="service-box" />
<text class="small-text" x="75" y="667">Application Layer</text>
<rect x="250" y="655" width="20" height="15" class="highlight-box" />
<text class="small-text" x="275" y="667">Cache Components</text>
<rect x="450" y="655" width="20" height="15" class="cache-box" />
<text class="small-text" x="475" y="667">Storage Layer</text>
<rect x="650" y="655" width="20" height="15" class="event-box" />
<text class="small-text" x="675" y="667">Event Handling</text>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

82
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/automatic-caching-flow.svg

@ -0,0 +1,82 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 400">
<defs>
<style>
.box { fill: #f8f9fa; stroke: #1890ff; stroke-width: 2; }
.highlight-box { fill: #e6f7ff; stroke: #1890ff; stroke-width: 2; }
.cache-box { fill: #f0f5ff; stroke: #597ef7; stroke-width: 2; }
.text { font-family: Arial, sans-serif; font-size: 14px; fill: #333; }
.title { font-family: Arial, sans-serif; font-size: 16px; fill: #1890ff; font-weight: bold; }
.small-text { font-family: Arial, sans-serif; font-size: 12px; fill: #666; }
.arrow { stroke: #666; stroke-width: 2; fill: none; marker-end: url(#arrowhead); }
.cache-arrow { stroke: #52c41a; stroke-width: 2; fill: none; marker-end: url(#arrowhead-green); }
.miss-arrow { stroke: #ff4d4f; stroke-width: 2; fill: none; marker-end: url(#arrowhead-red); }
</style>
<marker id="arrowhead" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#666" />
</marker>
<marker id="arrowhead-green" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#52c41a" />
</marker>
<marker id="arrowhead-red" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#ff4d4f" />
</marker>
</defs>
<!-- Title -->
<text class="title" x="450" y="30" text-anchor="middle">Automatic Caching Flow</text>
<!-- Client Call -->
<rect class="box" x="50" y="80" width="180" height="80" rx="5" />
<text class="text" x="140" y="115" text-anchor="middle">Client Call</text>
<text class="small-text" x="140" y="135" text-anchor="middle">GetAsync(bookId)</text>
<!-- Interceptor -->
<rect class="highlight-box" x="320" y="80" width="180" height="80" rx="5" />
<text class="text" x="410" y="110" text-anchor="middle">AutoCache</text>
<text class="text" x="410" y="130" text-anchor="middle">Interceptor</text>
<text class="small-text" x="410" y="145" text-anchor="middle">[Cache] detected</text>
<!-- Cache Check Diamond -->
<polygon class="cache-box" points="670,70 770,120 670,170 570,120" stroke="#1890ff" stroke-width="2" fill="#e6f7ff"/>
<text class="text" x="670" y="120" text-anchor="middle">Cache</text>
<text class="text" x="670" y="137" text-anchor="middle">Hit?</text>
<!-- Arrows -->
<path class="arrow" d="M 230 120 L 320 120" />
<path class="arrow" d="M 500 120 L 570 120" />
<!-- Cache Hit Path -->
<path class="cache-arrow" d="M 770 120 L 820 120 L 820 250 L 140 250 L 140 160" />
<text class="small-text" x="800" y="200" fill="#52c41a" font-weight="bold">✓ HIT</text>
<text class="small-text" x="780" y="265" fill="#52c41a">Return cached result (Fast!)</text>
<!-- Cache Miss Path -->
<path class="miss-arrow" d="M 670 170 L 670 240" />
<text class="small-text" x="685" y="210" fill="#ff4d4f" font-weight="bold">✗ MISS</text>
<!-- Execute Method -->
<rect class="box" x="580" y="260" width="180" height="80" rx="5" />
<text class="text" x="670" y="290" text-anchor="middle">Execute</text>
<text class="text" x="670" y="310" text-anchor="middle">Actual Method</text>
<text class="small-text" x="670" y="325" text-anchor="middle">Query Database</text>
<!-- Store in Cache -->
<rect class="cache-box" x="320" y="260" width="180" height="80" rx="5" />
<text class="text" x="410" y="290" text-anchor="middle">Store Result</text>
<text class="text" x="410" y="310" text-anchor="middle">in Cache</text>
<text class="small-text" x="410" y="325" text-anchor="middle">For future use</text>
<!-- Return to Client -->
<text class="small-text" x="270" y="285" text-anchor="middle">Return result</text>
<!-- Miss path arrows -->
<path class="arrow" d="M 580 300 L 500 300" />
<path class="arrow" d="M 320 300 L 230 300 L 230 120" />
<!-- Legend -->
<rect x="50" y="360" width="15" height="15" fill="#52c41a" opacity="0.3" />
<text class="small-text" x="70" y="372">Cache Hit (5-10ms)</text>
<rect x="250" y="360" width="15" height="15" fill="#ff4d4f" opacity="0.3" />
<text class="small-text" x="270" y="372">Cache Miss (100-500ms)</text>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

141
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-invalidation-flow.svg

@ -0,0 +1,141 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600">
<defs>
<style>
.box { fill: #f8f9fa; stroke: #1890ff; stroke-width: 2; }
.db-box { fill: #fff7e6; stroke: #fa8c16; stroke-width: 2; }
.cache-box { fill: #f0f5ff; stroke: #597ef7; stroke-width: 2; }
.event-box { fill: #f6ffed; stroke: #52c41a; stroke-width: 2; }
.invalidate-box { fill: #fff1f0; stroke: #ff4d4f; stroke-width: 2; }
.text { font-family: Arial, sans-serif; font-size: 14px; fill: #333; }
.title { font-family: Arial, sans-serif; font-size: 18px; fill: #1890ff; font-weight: bold; }
.section-title { font-family: Arial, sans-serif; font-size: 14px; fill: #1890ff; font-weight: bold; }
.small-text { font-family: Arial, sans-serif; font-size: 11px; fill: #666; }
.arrow { stroke: #666; stroke-width: 2; fill: none; marker-end: url(#arrowhead); }
.event-arrow { stroke: #52c41a; stroke-width: 2; fill: none; marker-end: url(#arrowhead-green); }
.invalidate-arrow { stroke: #ff4d4f; stroke-width: 3; fill: none; marker-end: url(#arrowhead-red); }
.step-number { fill: #1890ff; font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; }
</style>
<marker id="arrowhead" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#666" />
</marker>
<marker id="arrowhead-green" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#52c41a" />
</marker>
<marker id="arrowhead-red" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#ff4d4f" />
</marker>
</defs>
<!-- Title -->
<text class="title" x="500" y="35" text-anchor="middle">Cache Invalidation Workflow</text>
<!-- Step 1: User Action -->
<circle cx="100" cy="100" r="20" fill="#1890ff" />
<text class="step-number" x="100" y="107" text-anchor="middle" fill="white">1</text>
<rect class="box" x="150" y="70" width="180" height="60" rx="5" />
<text class="text" x="240" y="95" text-anchor="middle">User Action</text>
<text class="small-text" x="240" y="115" text-anchor="middle">UpdateAsync(bookId)</text>
<!-- Step 2: Database Update -->
<circle cx="100" cy="220" r="20" fill="#1890ff" />
<text class="step-number" x="100" y="227" text-anchor="middle" fill="white">2</text>
<rect class="db-box" x="150" y="190" width="180" height="60" rx="5" />
<text class="text" x="240" y="215" text-anchor="middle">Update Database</text>
<text class="small-text" x="240" y="235" text-anchor="middle">Repository.UpdateAsync()</text>
<!-- Step 3: Publish Event -->
<circle cx="100" cy="340" r="20" fill="#1890ff" />
<text class="step-number" x="100" y="347" text-anchor="middle" fill="white">3</text>
<rect class="event-box" x="150" y="310" width="180" height="60" rx="5" />
<text class="text" x="240" y="335" text-anchor="middle">Publish Event</text>
<text class="small-text" x="240" y="355" text-anchor="middle">EntityChangedEvent</text>
<!-- Arrows for steps 1-3 -->
<path class="arrow" d="M 240 130 L 240 190" />
<path class="arrow" d="M 240 250 L 240 310" />
<!-- Step 4: Event Handler -->
<circle cx="500" cy="340" r="20" fill="#1890ff" />
<text class="step-number" x="500" y="347" text-anchor="middle" fill="white">4</text>
<rect class="event-box" x="550" y="310" width="200" height="60" rx="5" />
<text class="text" x="650" y="330" text-anchor="middle">Invalidation</text>
<text class="text" x="650" y="348" text-anchor="middle">Handler</text>
<text class="small-text" x="650" y="363" text-anchor="middle">Listen for changes</text>
<!-- Arrow to handler -->
<path class="event-arrow" d="M 330 340 L 550 340" />
<text class="small-text" x="400" y="330" fill="#52c41a">Event Bus</text>
<!-- Step 5: UnitOfWork Check -->
<circle cx="500" cy="460" r="20" fill="#1890ff" />
<text class="step-number" x="500" y="467" text-anchor="middle" fill="white">5</text>
<rect class="box" x="550" y="430" width="200" height="60" rx="5" />
<text class="text" x="650" y="455" text-anchor="middle">Wait for UoW</text>
<text class="small-text" x="650" y="475" text-anchor="middle">OnCompleted() callback</text>
<!-- Arrow to UoW -->
<path class="arrow" d="M 650 370 L 650 430" />
<!-- Step 6: Clear Cache -->
<circle cx="850" cy="340" r="20" fill="#1890ff" />
<text class="step-number" x="850" y="347" text-anchor="middle" fill="white">6</text>
<rect class="invalidate-box" x="790" y="310" width="160" height="120" rx="5" />
<text class="text" x="870" y="335" text-anchor="middle">Clear Cache</text>
<!-- Cache entries being cleared -->
<line x1="805" y1="355" x2="935" y2="355" stroke="#ff4d4f" stroke-width="1" opacity="0.3"/>
<text class="small-text" x="815" y="375" fill="#ff4d4f">✗ GetAsync(id)</text>
<text class="small-text" x="815" y="392" fill="#ff4d4f">✗ GetListAsync()</text>
<text class="small-text" x="815" y="409" fill="#ff4d4f">✗ Related queries</text>
<!-- Arrow to clear cache -->
<path class="invalidate-arrow" d="M 750 460 L 870 460 L 870 430" />
<text class="small-text" x="785" y="452" fill="#ff4d4f" font-weight="bold">INVALIDATE</text>
<!-- Cache Storage Visualization -->
<rect class="cache-box" x="50" y="500" width="900" height="80" rx="5" />
<text class="section-title" x="500" y="525" text-anchor="middle">Redis / Distributed Cache</text>
<!-- Before invalidation -->
<text class="small-text" x="70" y="550" font-weight="bold">Before:</text>
<rect x="130" y="540" width="120" height="25" fill="#52c41a" opacity="0.3" rx="2" stroke="#52c41a"/>
<text class="small-text" x="190" y="557" text-anchor="middle">Book:Get:123 ✓</text>
<rect x="260" y="540" width="120" height="25" fill="#52c41a" opacity="0.3" rx="2" stroke="#52c41a"/>
<text class="small-text" x="320" y="557" text-anchor="middle">Book:List ✓</text>
<!-- After invalidation -->
<text class="small-text" x="560" y="550" font-weight="bold">After:</text>
<rect x="620" y="540" width="120" height="25" fill="#ff4d4f" opacity="0.2" rx="2" stroke="#ff4d4f" stroke-dasharray="3,3"/>
<text class="small-text" x="680" y="557" text-anchor="middle" fill="#999" text-decoration="line-through">Book:Get:123</text>
<rect x="750" y="540" width="120" height="25" fill="#ff4d4f" opacity="0.2" rx="2" stroke="#ff4d4f" stroke-dasharray="3,3"/>
<text class="small-text" x="810" y="557" text-anchor="middle" fill="#999" text-decoration="line-through">Book:List</text>
<!-- Arrow showing invalidation -->
<path class="invalidate-arrow" d="M 400 552 L 600 552" />
<text class="small-text" x="475" y="545" fill="#ff4d4f" font-weight="bold">CLEARED</text>
<!-- Timeline -->
<line x1="50" y1="100" x2="50" y2="490" stroke="#1890ff" stroke-width="2" opacity="0.3"/>
<text class="small-text" x="15" y="105" fill="#1890ff" transform="rotate(-90, 15, 105)">Timeline</text>
<!-- Info boxes -->
<rect x="400" y="70" width="250" height="100" rx="5" fill="#f0f5ff" stroke="#597ef7" stroke-width="2"/>
<text class="section-title" x="525" y="95" text-anchor="middle">Why Wait for UoW?</text>
<text class="small-text" x="415" y="115">• Ensures transaction completes</text>
<text class="small-text" x="415" y="132">• Prevents cache-DB inconsistency</text>
<text class="small-text" x="415" y="149">• Handles rollback scenarios</text>
<rect x="700" y="70" width="250" height="100" rx="5" fill="#fff1f0" stroke="#ff4d4f" stroke-width="2"/>
<text class="section-title" x="825" y="95" text-anchor="middle">Invalidation Scope</text>
<text class="small-text" x="715" y="115">• All caches with [Cache(Book)]</text>
<text class="small-text" x="715" y="132">• Across all scopes (Global, User)</text>
<text class="small-text" x="715" y="149">• Entity-specific keys by ID</text>
</svg>

After

Width:  |  Height:  |  Size: 7.8 KiB

135
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/images/cache-scoping-diagram.svg

@ -0,0 +1,135 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 500">
<defs>
<style>
.scope-box { fill: #f8f9fa; stroke: #1890ff; stroke-width: 2; }
.global-box { fill: #fff7e6; stroke: #fa8c16; stroke-width: 2; }
.user-box { fill: #e6f7ff; stroke: #1890ff; stroke-width: 2; }
.auth-box { fill: #f6ffed; stroke: #52c41a; stroke-width: 2; }
.entity-box { fill: #f9f0ff; stroke: #722ed1; stroke-width: 2; }
.text { font-family: Arial, sans-serif; font-size: 14px; fill: #333; }
.title { font-family: Arial, sans-serif; font-size: 18px; fill: #1890ff; font-weight: bold; }
.section-title { font-family: Arial, sans-serif; font-size: 15px; fill: #1890ff; font-weight: bold; }
.small-text { font-family: Arial, sans-serif; font-size: 11px; fill: #666; }
.code-text { font-family: 'Courier New', monospace; font-size: 11px; fill: #333; }
.badge { font-family: Arial, sans-serif; font-size: 10px; fill: white; font-weight: bold; }
</style>
</defs>
<!-- Title -->
<text class="title" x="500" y="35" text-anchor="middle">Cache Scoping Strategies</text>
<!-- Global Scope -->
<rect class="global-box" x="50" y="70" width="200" height="180" rx="5" />
<text class="section-title" x="150" y="95" text-anchor="middle">Global</text>
<circle cx="150" cy="130" r="30" fill="#fa8c16" opacity="0.2" stroke="#fa8c16" stroke-width="2"/>
<text class="text" x="150" y="137" text-anchor="middle" font-size="24">🌍</text>
<text class="small-text" x="65" y="175">Shared by all users</text>
<text class="small-text" x="65" y="190">Ideal for public data</text>
<rect x="65" y="200" width="170" height="35" fill="#fff" opacity="0.7" rx="3"/>
<text class="code-text" x="75" y="215">[Cache(typeof(Book),</text>
<text class="code-text" x="75" y="228">Scope = Global)]</text>
<!-- Current User Scope -->
<rect class="user-box" x="280" y="70" width="200" height="180" rx="5" />
<text class="section-title" x="380" y="95" text-anchor="middle">CurrentUser</text>
<circle cx="350" cy="130" r="25" fill="#1890ff" opacity="0.3" stroke="#1890ff" stroke-width="2"/>
<text class="text" x="350" y="137" text-anchor="middle" font-size="20">👤</text>
<circle cx="410" cy="130" r="25" fill="#1890ff" opacity="0.3" stroke="#1890ff" stroke-width="2"/>
<text class="text" x="410" y="137" text-anchor="middle" font-size="20">👤</text>
<text class="small-text" x="295" y="175">Per user (by ID)</text>
<text class="small-text" x="295" y="190">User-specific data</text>
<rect x="295" y="200" width="170" height="35" fill="#fff" opacity="0.7" rx="3"/>
<text class="code-text" x="305" y="215">[Cache(typeof(Order),</text>
<text class="code-text" x="305" y="228">Scope = CurrentUser)]</text>
<!-- Authenticated User Scope -->
<rect class="auth-box" x="510" y="70" width="200" height="180" rx="5" />
<text class="section-title" x="610" y="95" text-anchor="middle">AuthenticatedUser</text>
<rect x="565" y="110" width="90" height="40" fill="#52c41a" opacity="0.2" rx="3" stroke="#52c41a" stroke-width="2"/>
<text class="text" x="610" y="133" text-anchor="middle" font-size="16">🔐 Auth</text>
<rect x="565" y="155" width="90" height="30" fill="#ddd" opacity="0.4" rx="3" stroke="#999" stroke-width="1"/>
<text class="text" x="610" y="173" text-anchor="middle" font-size="12">Anonymous</text>
<text class="small-text" x="525" y="200">Auth vs Anonymous</text>
<rect x="525" y="210" width="170" height="35" fill="#fff" opacity="0.7" rx="3"/>
<text class="code-text" x="535" y="225">Scope =</text>
<text class="code-text" x="535" y="238">AuthenticatedUser</text>
<!-- Entity Scope -->
<rect class="entity-box" x="740" y="70" width="200" height="180" rx="5" />
<text class="section-title" x="840" y="95" text-anchor="middle">Entity</text>
<rect x="775" y="115" width="50" height="35" fill="#722ed1" opacity="0.2" rx="3" stroke="#722ed1" stroke-width="1"/>
<text class="text" x="800" y="135" text-anchor="middle" font-size="11">ID: 1</text>
<rect x="835" y="115" width="50" height="35" fill="#722ed1" opacity="0.2" rx="3" stroke="#722ed1" stroke-width="1"/>
<text class="text" x="860" y="135" text-anchor="middle" font-size="11">ID: 2</text>
<rect x="895" y="115" width="50" height="35" fill="#722ed1" opacity="0.2" rx="3" stroke="#722ed1" stroke-width="1"/>
<text class="text" x="920" y="135" text-anchor="middle" font-size="11">ID: 3</text>
<text class="small-text" x="755" y="170">Per entity instance</text>
<text class="small-text" x="755" y="185">By primary key</text>
<rect x="755" y="200" width="170" height="35" fill="#fff" opacity="0.7" rx="3"/>
<text class="code-text" x="765" y="215">[Cache(typeof(Book),</text>
<text class="code-text" x="765" y="228">Scope = Entity)]</text>
<!-- Examples Section -->
<line x1="50" y1="280" x2="950" y2="280" stroke="#ddd" stroke-width="2" />
<text class="section-title" x="50" y="310" fill="#1890ff">Common Use Cases</text>
<!-- Global Example -->
<rect class="global-box" x="50" y="325" width="220" height="70" rx="3" />
<text class="small-text" x="60" y="343" font-weight="bold" fill="#fa8c16">Global Scope</text>
<text class="small-text" x="60" y="360">✓ Product catalog</text>
<text class="small-text" x="60" y="375">✓ Configuration settings</text>
<text class="small-text" x="60" y="390">✓ Public announcements</text>
<!-- CurrentUser Example -->
<rect class="user-box" x="290" y="325" width="220" height="70" rx="3" />
<text class="small-text" x="300" y="343" font-weight="bold" fill="#1890ff">CurrentUser Scope</text>
<text class="small-text" x="300" y="360">✓ User profile</text>
<text class="small-text" x="300" y="375">✓ Shopping cart</text>
<text class="small-text" x="300" y="390">✓ User's order history</text>
<!-- AuthenticatedUser Example -->
<rect class="auth-box" x="530" y="325" width="200" height="70" rx="3" />
<text class="small-text" x="540" y="343" font-weight="bold" fill="#52c41a">Auth Scope</text>
<text class="small-text" x="540" y="360">✓ Member-only content</text>
<text class="small-text" x="540" y="375">✓ Navigation menus</text>
<text class="small-text" x="540" y="390">✓ Feature availability</text>
<!-- Entity Example -->
<rect class="entity-box" x="750" y="325" width="200" height="70" rx="3" />
<text class="small-text" x="760" y="343" font-weight="bold" fill="#722ed1">Entity Scope</text>
<text class="small-text" x="760" y="360">✓ Book details by ID</text>
<text class="small-text" x="760" y="375">✓ Product info by SKU</text>
<text class="small-text" x="760" y="390">✓ Invoice by number</text>
<!-- Cache Key Examples -->
<text class="section-title" x="50" y="435" fill="#1890ff">Cache Key Structure</text>
<rect x="50" y="445" width="900" height="40" fill="#f5f5f5" rx="3" stroke="#ddd" stroke-width="1"/>
<text class="code-text" x="60" y="462" fill="#fa8c16" font-weight="bold">Global:</text>
<text class="code-text" x="135" y="462">BookService:GetList:page1:size10</text>
<text class="code-text" x="60" y="477" fill="#1890ff" font-weight="bold">CurrentUser:</text>
<text class="code-text" x="135" y="477">OrderService:GetMyOrders:user:12345</text>
<text class="code-text" x="520" y="462" fill="#52c41a" font-weight="bold">Auth:</text>
<text class="code-text" x="570" y="462">MenuService:GetNav:auth:true</text>
<text class="code-text" x="520" y="477" fill="#722ed1" font-weight="bold">Entity:</text>
<text class="code-text" x="570" y="477">BookService:Get:entity:book-guid-123</text>
</svg>

After

Width:  |  Height:  |  Size: 7.5 KiB

797
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/post.md

@ -0,0 +1,797 @@
# Implement Automatic Method-Level Caching in ABP Framework
Caching is one of the most effective ways to improve application performance, but implementing it manually for every method can be tedious and error-prone. What if you could cache method results automatically with just an attribute? In this article, we'll explore how to build an automatic method-level caching system in ABP Framework that handles cache invalidation, supports multiple scopes, and integrates seamlessly with your existing application.
By the end of this guide, you'll understand how to implement attribute-based caching that automatically invalidates when entities change, supports user-specific and global caching scopes, and provides built-in metrics for monitoring cache performance.
> 💡 **Complete Implementation Available**: This article is based on a working demo project. You can find the complete implementation in the [AbpAutoCacheDemo repository](https://github.com/salihozkara/AbpAutoCacheDemo), with the core AutoCache library implementation available in [this commit](https://github.com/salihozkara/AbpAutoCacheDemo/commit/946df1fc07de6eddd26eb14013a09968cd59329b).
## What is Automatic Method-Level Caching?
Automatic method-level caching is a technique that intercepts method calls and caches their results without requiring manual cache management code. Instead of writing cache logic in every method, you simply decorate methods with attributes that define caching behavior.
![Automatic Caching Flow](./images/automatic-caching-flow.svg)
The key benefits include:
- **Reduced Boilerplate:** No repetitive cache management code in your business logic
- **Consistent Caching Strategy:** Centralized cache configuration and behavior
- **Smart Invalidation:** Automatic cache clearing when related entities change
- **Multiple Scopes:** Support for global, user-specific, and entity-specific caching
- **Built-in Monitoring:** Track cache hits, misses, and performance metrics
## Architecture Overview
The automatic caching system consists of several key components working together:
![Architecture Diagram](./images/architecture-diagram.svg)
**Core Components:**
1. **CacheAttribute:** The attribute you apply to methods to enable automatic caching
2. **AutoCacheInterceptor:** Intercepts method calls and handles cache operations
3. **AutoCacheManager:** Manages cache storage, retrieval, and key generation
4. **IAutoCacheKeyManager:** Handles cache key mapping and invalidation
5. **AutoCacheInvalidationHandler:** Listens to entity changes and clears related caches
This architecture leverages ABP's dynamic proxy system and event bus to provide seamless caching without modifying your business logic.
## Prerequisites
Before implementing automatic caching, ensure you have:
- ABP Framework 10.0 or later
## Implementation
> 📦 **Repository Structure**: The complete implementation is available in the [AbpAutoCacheDemo repository](https://github.com/salihozkara/AbpAutoCacheDemo). The AutoCache library is located in the `src/AutoCache` folder, making it easy to extract and reuse in your own projects.
### Step - 1: Create the AutoCache Module
First, let's create a separate module for our caching infrastructure. This makes it reusable across projects.
### Step - 1: Create the AutoCache Module
First, let's create a separate module for our caching infrastructure. This makes it reusable across projects.
Create `AutoCache.csproj`:
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="10.0.0" />
<PackageReference Include="Volo.Abp.Core" Version="10.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="10.0.0" />
</ItemGroup>
</Project>
```
Create the module class `AutoCacheModule.cs`:
```csharp
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
namespace AutoCache;
[DependsOn(typeof(AbpDddDomainModule), typeof(AbpCachingStackExchangeRedisModule))]
public class AutoCacheModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.OnRegistered(AutoCacheRegister.RegisterInterceptorIfNeeded); // 👈 Register interceptor
}
}
```
This module automatically registers the cache interceptor for any class that uses the `CacheAttribute`.
### Step - 2: Define the Cache Attribute
The `CacheAttribute` is the core of our automatic caching system. It specifies which entities affect the cache and what scope to use.
Create `CacheAttribute.cs`:
```csharp
using System;
using Volo.Abp.Domain.Entities;
namespace AutoCache;
[AttributeUsage(AttributeTargets.Method)]
public class CacheAttribute : Attribute
{
/// <summary>
/// Entity types that affect this cache. When these entities change, the cache will be invalidated.
/// </summary>
public Type[] InvalidateOnEntities { get; set; }
/// <summary>
/// Scope of the cache (Global, CurrentUser, AuthenticatedUser, or Entity)
/// </summary>
public AutoCacheScope Scope { get; set; } = AutoCacheScope.Global;
/// <summary>
/// Absolute expiration time relative to now in milliseconds (0 = use default, -1 = disabled)
/// </summary>
public long AbsoluteExpirationRelativeToNow { get; set; }
/// <summary>
/// Sliding expiration time in milliseconds (0 = use default, -1 = disabled)
/// </summary>
public long SlidingExpiration { get; set; }
public bool ConsiderUow { get; set; }
public string AdditionalCacheKey { get; set; }
public CacheAttribute(params Type[] invalidateOnEntities) // 👈 Specify entities that trigger cache invalidation
{
foreach (var entityType in invalidateOnEntities)
{
ArgumentNullException.ThrowIfNull(entityType);
if (!typeof(IEntity).IsAssignableFrom(entityType))
{
throw new ArgumentException($"Type {entityType.FullName} must implement IEntity interface.");
}
}
InvalidateOnEntities = invalidateOnEntities;
}
}
```
**Key Properties:**
- **InvalidateOnEntities:** Array of entity types that, when modified, will clear this cache
- **Scope:** Determines cache visibility (Global, CurrentUser, AuthenticatedUser, Entity)
- **AbsoluteExpirationRelativeToNow / SlidingExpiration:** Control cache lifetime
### Step - 3: Define Cache Scopes
Cache scopes determine how cache entries are partitioned. Create `AutoCacheScope.cs`:
```csharp
using System;
namespace AutoCache;
[Flags]
public enum AutoCacheScope
{
/// <summary>
/// Cache is shared globally across all users
/// </summary>
Global,
/// <summary>
/// Cache is scoped to the current user (based on user ID)
/// </summary>
CurrentUser,
/// <summary>
/// Cache is scoped to authenticated vs unauthenticated users
/// </summary>
AuthenticatedUser,
/// <summary>
/// Cache is scoped to the primary key of the entity involved
/// </summary>
Entity
}
```
![Cache Scoping Strategy](./images/cache-scoping-diagram.svg)
**When to Use Each Scope:**
- **Global:** For data that's the same for all users (e.g., configuration, public lists)
- **CurrentUser:** For user-specific data (e.g., user profile, user's orders)
- **AuthenticatedUser:** For data that differs between authenticated and anonymous users
- **Entity:** For data tied to a specific entity instance (e.g., book details by ID)
### Step - 4: Implement the Cache Interceptor
The interceptor is the heart of automatic caching. It intercepts method calls, checks the cache, and stores results. Create `AutoCacheInterceptor.cs`:
```csharp
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DynamicProxy;
namespace AutoCache;
public class AutoCacheInterceptor : AbpInterceptor, ITransientDependency
{
private readonly ILogger<AutoCacheInterceptor> _logger;
private readonly AutoCacheOptions _options;
private static readonly MethodInfo GetOrAddCacheAsyncMethod;
private readonly AutoCacheManager _autoCacheManager;
private static readonly ConcurrentDictionary<Type, MethodInfo> MethodCache = new();
static AutoCacheInterceptor()
{
GetOrAddCacheAsyncMethod = typeof(AutoCacheInterceptor).GetMethod(
nameof(GetOrAddCacheAsync),
BindingFlags.NonPublic | BindingFlags.Instance
)!;
}
public AutoCacheInterceptor(
ILogger<AutoCacheInterceptor> logger,
IOptions<AutoCacheOptions> options,
AutoCacheManager autoCacheManager)
{
_logger = logger;
_autoCacheManager = autoCacheManager;
_options = options.Value;
}
public override async Task InterceptAsync(IAbpMethodInvocation invocation)
{
// Check if caching is enabled and method has [Cache] attribute
if(!_options.Enabled ||
invocation.Method.GetCustomAttributes(typeof(CacheAttribute), true).FirstOrDefault()
is not CacheAttribute attribute)
{
await invocation.ProceedAsync(); // 👈 No caching, proceed normally
return;
}
var proceeded = false;
try
{
// Create generic method based on return type
var genericMethod = MethodCache.GetOrAdd(invocation.Method.ReturnType, t =>
{
var isGenericTask = t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Task<>);
var resultType = isGenericTask ? t.GetGenericArguments()[0] : t;
return GetOrAddCacheAsyncMethod.MakeGenericMethod(resultType);
});
// Execute cache logic
(var result, proceeded) = await (Task<(object, bool)>)genericMethod.Invoke(this, [invocation, attribute])!;
invocation.ReturnValue = result; // 👈 Set cached or fresh result
}
catch (Exception e)
{
_logger.LogError(e, "Error occurred while caching method {MethodName}", invocation.Method.Name);
if(e is AutoCacheExceptionWrapper exceptionWrapper)
{
if (_options.ThrowOnError)
{
throw exceptionWrapper.OriginalException;
}
_logger.LogWarning(
"Cache operation failed, falling back to method execution for {MethodName}",
invocation.Method.Name
);
}
if (!proceeded && invocation.ReturnValue == null)
{
await invocation.ProceedAsync(); // 👈 Fallback to actual method execution
}
}
}
private async Task<(object?, bool)> GetOrAddCacheAsync<TResult>(
IAbpMethodInvocation invocation,
CacheAttribute attribute)
{
var proceeded = false;
var result = await _autoCacheManager.GetOrAddAsync(
invocation.TargetObject,
Factory,
invocation.Arguments,
() => new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = GetExpiration(
attribute.AbsoluteExpirationRelativeToNow,
_options.DefaultAbsoluteExpirationRelativeToNow),
SlidingExpiration = GetExpiration(
attribute.SlidingExpiration,
_options.DefaultSlidingExpiration)
},
attribute.InvalidateOnEntities,
attribute.Scope,
attribute.ConsiderUow,
attribute.AdditionalCacheKey,
invocation.Method.Name);
return (result, proceeded);
async Task<TResult> Factory()
{
await invocation.ProceedAsync(); // 👈 Execute actual method on cache miss
proceeded = true;
return (TResult)invocation.ReturnValue;
}
}
private static TimeSpan? GetExpiration(long milliseconds, long defaultValue)
{
return milliseconds switch
{
0 => defaultValue > 0 ? TimeSpan.FromMilliseconds(defaultValue) : null,
< 0 => null,
_ => TimeSpan.FromMilliseconds(milliseconds)
};
}
}
```
The interceptor intelligently determines whether to serve cached data or execute the actual method.
### Step - 5: Implement the Cache Manager
The `AutoCacheManager` handles the actual cache operations. Create a simplified version:
```csharp
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DynamicProxy;
using Volo.Abp.Users;
namespace AutoCache;
public class AutoCacheManager : IScopedDependency
{
private readonly IAutoCacheKeyManager _autoCacheKeyManager;
private readonly ICurrentUser _currentUser;
private readonly ILogger<AutoCacheManager> _logger;
private readonly IAutoCacheMetrics _metrics;
private readonly AutoCacheOptions _options;
public AutoCacheManager(
IAutoCacheKeyManager autoCacheKeyManager,
ICurrentUser currentUser,
ILogger<AutoCacheManager> logger,
IAutoCacheMetrics metrics,
IOptions<AutoCacheOptions> options)
{
_autoCacheKeyManager = autoCacheKeyManager;
_currentUser = currentUser;
_logger = logger;
_metrics = metrics;
_options = options.Value;
}
public async Task<TResult> GetOrAddAsync<TResult>(
object? caller,
Func<Task<TResult>> func,
object?[]? parameters = null,
Func<DistributedCacheEntryOptions>? optionsFactory = null,
Type[]? invalidateOnEntities = null,
AutoCacheScope scope = AutoCacheScope.Global,
bool considerUow = false,
string? additionalCacheKey = null,
[CallerMemberName] string methodName = "")
{
if (!_options.Enabled)
{
return await func(); // 👈 Caching disabled, execute directly
}
var callerType = caller != null ? ProxyHelper.GetUnProxiedType(caller) : GetType();
parameters ??= [];
// Generate unique cache key based on method, parameters, and scope
var cacheKey = GenerateCacheKey<TResult>(
callerType.Name,
additionalCacheKey,
methodName,
parameters,
scope);
var (cachedResult, exception, wasHit) = await GetOrAddCacheAsync(
cacheKey,
func,
optionsFactory,
considerUow
);
// Record metrics
if (wasHit)
{
_metrics.RecordHit(cacheKey);
}
else
{
_metrics.RecordMiss(cacheKey);
}
if (exception != null)
{
_metrics.RecordError(cacheKey, exception);
if (_options.ThrowOnError)
{
throw exception;
}
}
return cachedResult;
}
private string GenerateCacheKey<TResult>(
string callerTypeName,
string? additionalCacheKey,
string methodName,
object?[] parameters,
AutoCacheScope scope)
{
var keyBuilder = new StringBuilder();
keyBuilder.Append($"{callerTypeName}:{methodName}");
// Add parameters to key
foreach (var param in parameters)
{
keyBuilder.Append($":{param}");
}
// Add scope-specific segments
if (scope.HasFlag(AutoCacheScope.CurrentUser) && _currentUser.Id.HasValue)
{
keyBuilder.Append($":user:{_currentUser.Id}"); // 👈 User-specific cache key
}
if (scope.HasFlag(AutoCacheScope.AuthenticatedUser))
{
keyBuilder.Append($":auth:{_currentUser.IsAuthenticated}");
}
if (!string.IsNullOrEmpty(additionalCacheKey))
{
keyBuilder.Append($":{additionalCacheKey}");
}
return keyBuilder.ToString();
}
// Additional methods for cache retrieval and storage...
}
```
The manager generates unique cache keys based on method signatures, parameters, and scope settings.
### Step - 6: Implement Cache Invalidation
When entities change, related caches must be cleared. Create `AutoCacheInvalidationHandler.cs`:
```csharp
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Events;
using Volo.Abp.EventBus;
using Volo.Abp.Uow;
namespace AutoCache;
public class AutoCacheInvalidationHandler<TEntity> :
ILocalEventHandler<EntityChangedEventData<TEntity>>
where TEntity : class, IEntity
{
private readonly IAutoCacheKeyManager _autoCacheKeyManager;
private readonly ILogger<AutoCacheInvalidationHandler<TEntity>> _logger;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public AutoCacheInvalidationHandler(
IAutoCacheKeyManager autoCacheKeyManager,
ILogger<AutoCacheInvalidationHandler<TEntity>> logger,
IUnitOfWorkManager unitOfWorkManager)
{
_autoCacheKeyManager = autoCacheKeyManager;
_logger = logger;
_unitOfWorkManager = unitOfWorkManager;
}
public async Task HandleEventAsync(EntityChangedEventData<TEntity> eventData)
{
try
{
var entityType = typeof(TEntity);
var context = new RemoveCacheKeyContext
{
Keys = eventData.Entity.GetKeys()!
};
// Clear cache after unit of work completes
if(_unitOfWorkManager.Current != null)
{
_unitOfWorkManager.Current.OnCompleted(async () =>
{
await _autoCacheKeyManager.RemoveCacheAndCacheKeys(entityType, context); // 👈 Invalidate cache
});
}
else
{
await _autoCacheKeyManager.RemoveCacheAndCacheKeys(entityType, context);
}
}
catch (Exception e)
{
_logger.LogError(
e,
"Error occurred while clearing cache for entity type {EntityType}",
typeof(TEntity).FullName
);
}
}
}
```
![Cache Invalidation Flow](./images/cache-invalidation-flow.svg)
This handler listens to entity change events and automatically clears related caches. The invalidation happens after the unit of work completes to ensure data consistency.
### Step - 7: Configure AutoCache in Your Application
Add the `AutoCacheModule` to your application module dependencies:
```csharp
[DependsOn(
typeof(AutoCacheModule), // 👈 Add AutoCache module
typeof(AbpCachingStackExchangeRedisModule),
// ... other modules
)]
public class YourApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AutoCacheOptions>(options =>
{
options.Enabled = true; // 👈 Enable caching
options.DefaultAbsoluteExpirationRelativeToNow = 3600000; // 1 hour
options.DefaultSlidingExpiration = 600000; // 10 minutes
options.ThrowOnError = false; // Fallback to method execution on cache errors
});
// Configure Redis (if using distributed cache)
Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "YourApp:";
});
}
}
```
### Step - 8: Use Automatic Caching in Application Services
Now comes the easy part - using automatic caching! Simply add the `[Cache]` attribute to your methods:
```csharp
using AutoCache;
[Authorize(AutoCacheDemoPermissions.Books.Default)]
public class BookAppService : ApplicationService, IBookAppService
{
private readonly IRepository<Book, Guid> _repository;
private readonly AutoCacheManager _autoCacheManager;
public BookAppService(IRepository<Book, Guid> repository, AutoCacheManager autoCacheManager)
{
_repository = repository;
_autoCacheManager = autoCacheManager;
}
// Cache this method, invalidate when Book entity changes
[Cache(typeof(Book), Scope = AutoCacheScope.Global)]
public virtual async Task<BookDto> GetAsync(Guid id)
{
// You can also use AutoCacheManager directly for nested caching
var book = await _autoCacheManager.GetOrAddAsync(
this,
async () => await _repository.GetAsync(id),
[id], // 👈 Method parameters
invalidateOnEntities: [typeof(Book)],
scope: AutoCacheScope.Entity);
return ObjectMapper.Map<Book, BookDto>(book!);
}
// Cache book list, invalidate when any Book changes
[Cache(typeof(Book))]
public virtual async Task<PagedResultDto<BookDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
var queryable = await _repository.GetQueryableAsync();
var query = queryable
.OrderBy(input.Sorting.IsNullOrWhiteSpace() ? "Name" : input.Sorting)
.Skip(input.SkipCount)
.Take(input.MaxResultCount);
var books = await AsyncExecuter.ToListAsync(query);
var totalCount = await AsyncExecuter.CountAsync(queryable);
return new PagedResultDto<BookDto>(
totalCount,
ObjectMapper.Map<List<Book>, List<BookDto>>(books)
);
}
// No caching on write operations
[Authorize(AutoCacheDemoPermissions.Books.Create)]
public async Task<BookDto> CreateAsync(CreateUpdateBookDto input)
{
var book = ObjectMapper.Map<CreateUpdateBookDto, Book>(input);
await _repository.InsertAsync(book); // 👈 This will trigger cache invalidation
return ObjectMapper.Map<Book, BookDto>(book);
}
}
```
**What Happens Here:**
1. When `GetAsync` is called, the interceptor checks the cache
2. On cache miss, the actual method executes and the result is cached
3. When `CreateAsync` inserts a `Book`, the invalidation handler clears all caches related to `Book`
4. Next call to `GetAsync` will fetch fresh data
## Advanced Features
### User-Specific Caching
For user-specific data, use `AutoCacheScope.CurrentUser`:
```csharp
[Cache(typeof(Order), Scope = AutoCacheScope.CurrentUser)]
public virtual async Task<List<OrderDto>> GetMyOrdersAsync()
{
var orders = await _orderRepository.GetListAsync(x => x.UserId == CurrentUser.Id);
return ObjectMapper.Map<List<Order>, List<OrderDto>>(orders);
}
```
Each user gets their own cache entry, automatically invalidated when their orders change.
### Custom Cache Keys
For fine-grained control, add custom cache key segments:
```csharp
[Cache(
typeof(Product),
Scope = AutoCacheScope.Global,
AdditionalCacheKey = "featured"
)]
public virtual async Task<List<ProductDto>> GetFeaturedProductsAsync()
{
// Only featured products are cached separately
return await GetProductsByCategoryAsync("Featured");
}
```
### Performance Metrics
Monitor cache performance using `IAutoCacheMetrics`:
```csharp
public class CacheMonitoringService : ITransientDependency
{
private readonly IAutoCacheMetrics _metrics;
public CacheMonitoringService(IAutoCacheMetrics metrics)
{
_metrics = metrics;
}
public AutoCacheStatistics GetStatistics()
{
return _metrics.GetStatistics(); // 👈 Get hit rate, miss count, error count
}
}
```
## Testing the Application
### 1. Run the Application
```bash
abp new BookStore -u mvc -d ef
cd BookStore
dotnet run --project src/BookStore.Web
```
### 2. Test Cache Behavior
Create a simple test to verify caching:
```csharp
[Fact]
public async Task Should_Cache_Book_Results()
{
// First call - cache miss
var book1 = await _bookAppService.GetAsync(testBookId);
// Second call - cache hit (should be faster)
var book2 = await _bookAppService.GetAsync(testBookId);
book1.Name.ShouldBe(book2.Name);
}
[Fact]
public async Task Should_Invalidate_Cache_On_Update()
{
// Cache the book
var book1 = await _bookAppService.GetAsync(testBookId);
// Update the book
await _bookAppService.UpdateAsync(testBookId, new CreateUpdateBookDto
{
Name = "Updated Name"
});
// Fetch again - should get updated data (cache was invalidated)
var book2 = await _bookAppService.GetAsync(testBookId);
book2.Name.ShouldBe("Updated Name");
}
```
### 3. Monitor Cache Performance
Check your application logs for cache metrics:
```
[INF] Cache Hit: BookAppService:GetAsync:book-id-123 (Response Time: 5ms)
[INF] Cache Miss: BookAppService:GetListAsync (Response Time: 156ms)
[INF] Cache Invalidation: Book entity changed, cleared 3 cache entries
```
## Key Takeaways
**Automatic caching reduces boilerplate code** - Just add `[Cache]` attribute to methods instead of manual cache management
**Smart invalidation keeps data fresh** - Entity changes automatically clear related caches without manual intervention
**Multiple scoping options** - Support for global, user-specific, authenticated, and entity-level caching strategies
**Built-in fallback handling** - Gracefully falls back to method execution if caching fails
**Performance monitoring** - Track cache hits, misses, and errors for optimization
## Conclusion
Automatic method-level caching dramatically simplifies performance optimization in ABP Framework applications. By using attributes and interceptors, you can add sophisticated caching behavior without cluttering your business logic with cache management code.
The system we've built provides intelligent cache invalidation, multiple scoping strategies, and built-in monitoring - all while maintaining clean, readable code. Whether you're building a small application or an enterprise system, this approach scales elegantly and integrates seamlessly with ABP's architecture.
Ready to implement this in your project? The complete working implementation is available in the [AbpAutoCacheDemo repository](https://github.com/salihozkara/AbpAutoCacheDemo). You can clone the repository, explore the code, and even extract the `src/AutoCache` folder to use it as a standalone library in your own ABP applications. The [main implementation commit](https://github.com/salihozkara/AbpAutoCacheDemo/commit/946df1fc07de6eddd26eb14013a09968cd59329b) shows all the components working together, including interceptor registration, cache key management, and automatic invalidation handlers.r you're building a small application or an enterprise system, this approach scales elegantly and integrates seamlessly with ABP's architecture.
Ready to implement this in your project? Check out the complete working example in the repository linked below, and start improving your application's performance today!
### See Also
- [ABP Caching Documentation](https://abp.io/docs/latest/framework/fundamentals/caching)
- [Interceptors in ABP](https://abp.io/docs/latest/framework/infrastructure/interceptors)
- [Event Bus Documentation](https://abp.io/docs/latest/framework/infrastructure/event-bus)
- [Sample Project on GitHub](https://github.com/salihozkara/AbpAutoCacheDemo)
---
## References
- [ABP Framework Documentation](https://docs.abp.io)
- [Redis Distributed Caching](https://redis.io/docs/)
- [Aspect-Oriented Programming Patterns](https://en.wikipedia.org/wiki/Aspect-oriented_programming)

1
docs/en/Community-Articles/2025-12-06-Implement-Automatic-Method-Level-Caching-in-ABP-Framework/summary.md

@ -0,0 +1 @@
Learn how to implement automatic method-level caching in ABP Framework using attributes and interceptors. This comprehensive guide covers building a reusable cache infrastructure with attribute-based caching, intelligent cache invalidation when entities change, support for multiple cache scopes (Global, CurrentUser, AuthenticatedUser, and Entity), seamless integration with ABP's dynamic proxy system and event bus, and built-in performance metrics for monitoring cache effectiveness in production applications.

14
docs/en/cli/index.md

@ -7,11 +7,7 @@
# ABP CLI
ABP CLI (Command Line Interface) is a command line tool to perform some common operations for ABP based solutions or ABP Studio features.
> With **v8.2+**, the old/legacy ABP CLI has been replaced with a new CLI system to align with the new templating system and [ABP Studio](../studio/index.md). The new ABP CLI commands are explained in this documentation. However, if you want to learn more about the differences between the old and new CLIs, want to learn the reason for the change, or need guidance to use the old ABP CLI, please refer to the [Old vs New CLI](differences-between-old-and-new-cli.md) documentation.
>
> You may need to remove the Old CLI before installing the New CLI, by running the following command: `dotnet tool uninstall -g Volo.Abp.Cli`
ABP CLI (Command Line Interface) is a command line tool to perform some common operations for ABP based solutions or [ABP Studio](../studio/index.md) features.
## Installation
@ -29,16 +25,16 @@ dotnet tool update -g Volo.Abp.Studio.Cli
## Global Options
While each command may have a set of options, there are some global options that can be used with any command;
While each command may have a set of options, there are some global options that can be used with any command:
* `--skip-cli-version-check` or `-scvc`: Skips to check the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI.
- `--skip-extension-version-check` or `-sevc`: Skips to check the latest version of the ABP CLI extensions. If you don't specify, it will check the latest version and download the latest version if there is a newer version of the ABP CLI extensions.
* `--skip-cli-version-check` or `-scvc`: Skips checking the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI.
- `--skip-extension-version-check` or `-sevc`: Skips checking the latest version of the ABP CLI extensions. If you don't specify, it will check the latest version and download the latest version if there is a newer version of the ABP CLI extensions.
* `--old`: ABP CLI has two variations: `Volo.Abp.Studio.Cli` and `Volo.Abp.Cli`. New features/templates are added to the `Volo.Abp.Studio.Cli`. But if you want to use the old version, you can use this option **at the end of your commands**. For example, `abp new Acme.BookStore --old`.
* `--help` or `-h`: Shows help for the specified command.
## Commands
Here, is the list of all available commands before explaining their details:
Here is the list of all available commands before explaining their details:
* **[`help`](../cli#help)**: Shows help on the usage of the ABP CLI.
* **[`cli`](../cli#cli)**: Update or remove ABP CLI.

2
docs/en/contribution/angular-ui.md

@ -12,7 +12,7 @@
- Dotnet core SDK https://dotnet.microsoft.com/en-us/download
- Nodejs LTS https://nodejs.org/en/
- Docker https://docs.docker.com/engine/install
- Angular CLI. https://angular.io/guide/what-is-angular#angular-cli
- Angular CLI. https://angular.dev/tools/cli
- Abp CLI https://docs.abp.io/en/abp/latest/cli
- A code editor

24
docs/en/docs-nav.json

@ -552,6 +552,24 @@
"text": "Audit Logging",
"path": "framework/infrastructure/audit-logging.md"
},
{
"text": "Artificial Intelligence",
"items":[
{
"text": "Overview",
"path": "framework/infrastructure/artificial-intelligence/index.md",
"isIndex": true
},
{
"text": "Microsoft.Extensions.AI",
"path": "framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md"
},
{
"text": "Semantic Kernel",
"path": "framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md"
}
]
},
{
"text": "Background Jobs",
"items": [
@ -1539,6 +1557,10 @@
"text": "Service Proxies",
"path": "framework/ui/angular/service-proxies.md"
},
{
"text": "SSR Configuration",
"path": "framework/ui/angular/ssr-configuration.md"
},
{
"text": "PWA Configuration",
"path": "framework/ui/angular/pwa-configuration.md"
@ -1623,7 +1645,7 @@
"path": "framework/ui/angular/list-service.md"
},
{
"text": "Easy *ngFor trackBy",
"text": "Easy @for() track",
"path": "framework/ui/angular/track-by-service.md"
},
{

307
docs/en/framework/infrastructure/artificial-intelligence.md

@ -1,307 +0,0 @@
# Artificial Intelligence
ABP provides a simple way to integrate AI capabilities into your applications by unifying two popular .NET AI stacks under a common concept called a "workspace":
- Microsoft.Extensions.AI `IChatClient`
- Microsoft.SemanticKernel `Kernel`
A workspace is just a named scope. You configure providers per workspace and then resolve either default services (for the "Default" workspace) or workspace-scoped services.
## Installation
> This package is not included by default. Install it to enable AI features.
It is suggested to use the ABP CLI to install the package. Open a command line window in the folder of the project (.csproj file) and type the following command:
```bash
abp add-package Volo.Abp.AI
```
### Manual Installation
Add nuget package to your project:
```bash
dotnet add package Volo.Abp.AI
```
Then add the module dependency to your module class:
```csharp
using Volo.Abp.AI;
using Volo.Abp.Modularity;
[DependsOn(typeof(AbpAIModule))]
public class MyProjectModule : AbpModule
{
}
```
## Usage
### Chat Client
#### Default configuration (quick start)
Configure the default workspace to inject `IChatClient` directly.
```csharp
using Microsoft.Extensions.AI;
using Microsoft.SemanticKernel;
using Volo.Abp.AI;
using Volo.Abp.Modularity;
public class MyProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpAIOptions>(options =>
{
options.Workspaces.ConfigureDefault(configuration =>
{
configuration.ConfigureChatClient(chatClientConfiguration =>
{
chatClientConfiguration.Builder = new ChatClientBuilder(
sp => new OllamaApiClient("http://localhost:11434", "mistral")
);
});
// Chat client only in this quick start
});
});
}
}
```
Once configured, inject the default chat client:
```csharp
using Microsoft.Extensions.AI;
public class MyService
{
private readonly IChatClient _chatClient; // default chat client
public MyService(IChatClient chatClient)
{
_chatClient = chatClient;
}
}
```
#### Workspace configuration
Workspaces allow multiple, isolated AI configurations. Define workspace types (optionally decorated with `WorkspaceNameAttribute`). If omitted, the type’s full name is used.
```csharp
using Volo.Abp.AI;
[WorkspaceName("GreetingAssistant")]
public class GreetingAssistant // ChatClient-only workspace
{
}
```
Configure a ChatClient workspace:
```csharp
public class MyProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpAIOptions>(options =>
{
options.Workspaces.Configure<GreetingAssistant>(configuration =>
{
configuration.ConfigureChatClient(chatClientConfiguration =>
{
chatClientConfiguration.Builder = new ChatClientBuilder(
sp => new OllamaApiClient("http://localhost:11434", "mistral")
);
chatClientConfiguration.BuilderConfigurers.Add(builder =>
{
// Anything you want to do with the builder:
// builder.UseFunctionInvocation().UseLogging(); // For example
});
});
});
});
}
}
```
### Semantic Kernel
#### Default configuration
```csharp
public class MyProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpAIOptions>(options =>
{
options.Workspaces.ConfigureDefault(configuration =>
{
configuration.ConfigureKernel(kernelConfiguration =>
{
kernelConfiguration.Builder = Kernel.CreateBuilder()
.AddAzureOpenAIChatClient("...", "...");
});
// Note: Chat client is not configured here
});
});
}
}
```
Once configured, inject the default kernel:
```csharp
using System.Threading.Tasks;
using Volo.Abp.AI;
public class MyService
{
private readonly IKernelAccessor _kernelAccessor;
public MyService(IKernelAccessor kernelAccessor)
{
_kernelAccessor = kernelAccessor;
}
public async Task DoSomethingAsync()
{
var kernel = _kernelAccessor.Kernel; // Kernel might be null if no workspace is configured.
var result = await kernel.InvokeAsync(/*... */);
}
}
```
#### Workspace configuration
```csharp
public class MyProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpAIOptions>(options =>
{
options.Workspaces.Configure<ContentPlanner>(configuration =>
{
configuration.ConfigureKernel(kernelConfiguration =>
{
kernelConfiguration.Builder = Kernel.CreateBuilder()
.AddOpenAIChatCompletion("...", "...");
});
});
});
}
}
```
#### Workspace usage
```csharp
using Microsoft.Extensions.AI;
using Volo.Abp.AI;
using Microsoft.SemanticKernel;
public class PlanningService
{
private readonly IKernelAccessor<ContentPlanner> _kernelAccessor;
private readonly IChatClient<ContentPlanner> _chatClient; // available even if only Kernel is configured
public PlanningService(
IKernelAccessor<ContentPlanner> kernelAccessor,
IChatClient<ContentPlanner> chatClient)
{
_kernelAccessor = kernelAccessor;
_chatClient = chatClient;
}
public async Task<string> PlanAsync(string topic)
{
var kernel = _kernelAccessor.Kernel; // Microsoft.SemanticKernel.Kernel
// Use Semantic Kernel APIs if needed...
var response = await _chatClient.GetResponseAsync(
[new ChatMessage(ChatRole.User, $"Create a content plan for: {topic}")]
);
return response?.Message?.Text ?? string.Empty;
}
}
```
## Options
`AbpAIOptions` configuration pattern offers `ConfigureChatClient(...)` and `ConfigureKernel(...)` methods for configuration. These methods are defined in the `WorkspaceConfiguration` class. They are used to configure the `ChatClient` and `Kernel` respectively.
`Builder` is set once and is used to build the `ChatClient` or `Kernel` instance. `BuilderConfigurers` is a list of actions that are applied to the `Builder` instance for incremental changes. These actions are executed in the order they are added.
If a workspace configures only the Kernel, a chat client may still be exposed for that workspace through the Kernel’s service provider (when available).
## Advanced Usage and Customizations
### Addding Your Own DelegatingChatClient
If you want to build your own decorator, implement a `DelegatingChatClient` derivative and provide an extension method that adds it to the `ChatClientBuilder` using `builder.Use(...)`.
Example sketch:
```csharp
using Microsoft.Extensions.AI;
public class SystemMessageChatClient : DelegatingChatClient
{
public SystemMessageChatClient(IChatClient inner, string systemMessage) : base(inner)
{
SystemMessage = systemMessage;
}
public string SystemMessage { get; set; }
public override Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
{
// Mutate messages/options as needed, then call base
return base.GetResponseAsync(messages, options, cancellationToken);
}
}
public static class SystemMessageChatClientExtensions
{
public static ChatClientBuilder UseSystemMessage(this ChatClientBuilder builder, string systemMessage)
{
return builder.Use(client => new SystemMessageChatClient(client, systemMessage));
}
}
```
```cs
chatClientConfiguration.BuilderConfigurers.Add(builder =>
{
builder.UseSystemMessage("You are a helpful assistant that greets users in a friendly manner with their names.");
});
```
## Technical Anatomy
- `AbpAIModule`: Wires up configured workspaces, registers keyed services and default services for the `"Default"` workspace.
- `AbpAIOptions`: Holds `Workspaces` and provides helper methods for internal keyed service naming.
- `WorkspaceConfigurationDictionary` and `WorkspaceConfiguration`: Configure per-workspace Chat Client and Kernel.
- `ChatClientConfiguration` and `KernelConfiguration`: Hold builders and a list of ordered builder configurers.
- `WorkspaceNameAttribute`: Names a workspace; falls back to the type’s full name if not specified.
- `IChatClient<TWorkspace>`: Typed chat client for a workspace.
- `IKernelAccessor<TWorkspace>`: Provides access to the workspace’s `Kernel` instance if configured.
- `AbpAIWorkspaceOptions`: Exposes `ConfiguredWorkspaceNames` for diagnostics.
There are no database tables for this feature; it is a pure configuration and DI integration layer.
## See Also
- Microsoft.Extensions.AI (Chat Client)
- Microsoft Semantic Kernel

38
docs/en/framework/infrastructure/artificial-intelligence/index.md

@ -0,0 +1,38 @@
```json
//[doc-seo]
{
"Description": "Explore ABP Framework's AI integration, enabling seamless AI capabilities, workspace management, and reusable modules for .NET developers."
}
```
# Artificial Intelligence (AI)
ABP Framework provides integration for AI capabilities to your application by using Microsoft's popular AI libraries. The main purpose of this integration is to provide a consistent and easy way to use AI capabilities and manage different AI providers, models and configurations in a single application.
ABP introduces a concept called **AI Workspace**. A workspace allows you to configure isolated AI configurations for a named scope. You can then resolve AI services for a specific workspace when you need to use them.
> ABP Framework can work with any AI library or framework that supports .NET development. However, the AI integration features explained in the following documents provide a modular and standard way to work with AI, which allows ABP developers to create reusable modules and components with AI capabilities in a standard way.
## Installation
Use the [ABP CLI](../../../cli/index.md) to install the [Volo.Abp.AI](https://www.nuget.org/packages/Volo.Abp.AI) NuGet package into your project. Open a command line window in the root directory of your project (`.csproj` file) and type the following command:
```bash
abp add-package Volo.Abp.AI
```
*For different installation options, check [the package definition page](https://abp.io/package-detail/Volo.Abp.AI).*
## Usage
The `Volo.Abp.AI` package provides integration with the following libraries:
* [Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai)
* [Microsoft.SemanticKernel](https://learn.microsoft.com/en-us/semantic-kernel/overview/)
The Microsoft.Extensions.AI library is suggested for library developers to keep the library dependency minimum and simple (since it provides basic abstractions and fundamental AI provider integrations), while Semantic Kernel is suggested for applications that need rich and advanced AI integration features.
Check the following documentation to learn how to use these libraries with the ABP integration:
- [ABP Microsoft.Extensions.AI integration](./microsoft-extensions-ai.md)
- [ABP Microsoft.SemanticKernel integration](./microsoft-semantic-kernel.md)

176
docs/en/framework/infrastructure/artificial-intelligence/microsoft-extensions-ai.md

@ -0,0 +1,176 @@
# Microsoft.Extensions.AI
[Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai) is a library that provides a unified API for integrating AI services. It is a part of the Microsoft AI Extensions Library. It is used to integrate AI services into your application. This documentation is about the usage of this library with ABP Framework. Make sure you have read the [Artificial Intelligence](./index.md) documentation before reading this documentation.
## Usage
You can resolve `IChatClient` to access configured chat client from your service and use it directly.
```csharp
public class MyService
{
private readonly IChatClient _chatClient;
public MyService(IChatClient chatClient)
{
_chatClient = chatClient;
}
public async Task<string> GetResponseAsync(string prompt)
{
return await _chatClient.GetResponseAsync(prompt);
}
}
```
You can also resolve `IChatClientAccessor` to access the `IChatClient` optionally configured scenarios such as developing a module or a service that may use AI capabilities **optionally**.
```csharp
public class MyService
{
private readonly IChatClientAccessor _chatClientAccessor;
public MyService(IChatClientAccessor chatClientAccessor)
{
_chatClientAccessor = chatClientAccessor;
}
public async Task<string> GetResponseAsync(string prompt)
{
var chatClient = _chatClientAccessor.ChatClient;
if (chatClient is null)
{
return "No chat client configured";
}
return await chatClient.GetResponseAsync(prompt);
}
}
```
### Workspaces
Workspaces are a way to configure isolated AI configurations for a named scope. You can define a workspace by decorating a class with the `WorkspaceNameAttribute` attribute that carries the workspace name.
- Workspace names must be unique.
- Workspace names cannot contain spaces _(use underscores or camelCase)_.
- Workspace names are case-sensitive.
```csharp
using Volo.Abp.AI;
[WorkspaceName("CommentSummarization")]
public class CommentSummarization
{
}
```
> [!NOTE]
> If you don't specify the workspace name, the full name of the class will be used as the workspace name.
You can resolve generic versions of `IChatClient` and `IChatClientAccessor` services for a specific workspace as generic arguments. If Chat Client is not configured for a workspace, you will get `null` from the accessor services. You should check the accessor before using it. This applies only for specified workspaces. Another workspace may have a configured Chat Client.
`IChatClient<TWorkSpace>` or `IChatClientAccessor<TWorkSpace>` can be resolved to access a specific workspace's chat client. This is a typed chat client and can be configured separately from the default chat client.
Example of resolving a typed chat client:
```csharp
public class MyService
{
private readonly IChatClient<CommentSummarization> _chatClient;
public MyService(IChatClient<CommentSummarization> chatClient)
{
_chatClient = chatClient;
}
public async Task<string> GetResponseAsync(string prompt)
{
return await _chatClient.GetResponseAsync(prompt);
}
}
```
Example of resolving a typed chat client accessor:
```csharp
public class MyService
{
private readonly IChatClientAccessor<CommentSummarization> _chatClientAccessor;
}
public async Task<string> GetResponseAsync(string prompt)
{
var chatClient = _chatClientAccessor.ChatClient;
if (chatClient is null)
{
return "No chat client configured";
}
return await chatClient.GetResponseAsync(prompt);
}
}
```
## Configuration
`AbpAIWorkspaceOptions` configuration is used to configure AI workspaces and their configurations. You can configure the default workspace and also configure isolated workspaces by using the this options class.It has to be configured **before the services are configured** in the `PreConfigure` method of your module class. It is important since the services are registered after the configuration is applied.
- `AbpAIWorkspaceOptions` has a `Workspaces` property that is type of `WorkspaceConfigurationDictionary` which is a dictionary of workspace names and their configurations. It provides `Configure<T>` and `ConfigureDefault` methods to configure the default workspace and also configure isolated workspaces by using the workspace type.
- Configure method passes `WorkspaceConfiguration` object to the configure action. You can configure the `ChatClient` by using the `ConfigureChatClient` method.
- `ConfigureChatClient()` method passes `ChatClientConfiguration` parameter to the configure action. You can configure the `Builder` and `BuilderConfigurers` by using the `ConfigureBuilder` method.
- `Builder` is set once and is used to build the `ChatClient` instance.
- `BuilderConfigurers` is a list of actions that are applied to the `Builder` instance for incremental changes.These actions are executed in the order they are added.
To configure a chat client, you'll need a LLM provider package such as [Microsoft.Extensions.AI.OpenAI](https://www.nuget.org/packages/Microsoft.Extensions.AI.OpenAI) or [OllamaSharp](https://www.nuget.org/packages/OllamaSharp/) to configure a chat client.
_The following example requires [OllamaSharp](https://www.nuget.org/packages/OllamaSharp/) package to be installed._
Demonstration of the default workspace configuration:
```csharp
[DependsOn(typeof(AbpAIModule))]
public class MyProjectModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAIWorkspaceOptions>(options =>
{
options.Workspaces.ConfigureDefault(configuration =>
{
configuration.ConfigureChatClient(chatClientConfiguration =>
{
chatClientConfiguration.Builder = new ChatClientBuilder(
sp => new OllamaApiClient("http://localhost:11434", "mistral")
);
});
});
});
}
}
```
Demonstration of the isolated workspace configuration:
```csharp
[DependsOn(typeof(AbpAIModule))]
public class MyProjectModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAIWorkspaceOptions>(options =>
{
options.Workspaces.Configure<CommentSummarization>(configuration =>
{
configuration.ConfigureChatClient(chatClientConfiguration =>
{
chatClientConfiguration.Builder = new ChatClientBuilder(
sp => new OllamaApiClient("http://localhost:11434", "mistral")
);
});
});
});
}
}
```
## See Also
- [Usage of Semantic Kernel](./microsoft-semantic-kernel.md)
- [AI Samples for .NET](https://learn.microsoft.com/en-us/samples/dotnet/ai-samples/ai-samples/)

135
docs/en/framework/infrastructure/artificial-intelligence/microsoft-semantic-kernel.md

@ -0,0 +1,135 @@
# Microsoft.SemanticKernel
[Microsoft.SemanticKernel](https://learn.microsoft.com/en-us/semantic-kernel/overview/) is a library that provides a unified SDK for integrating AI services. This documentation is about the usage of this library with ABP Framework. Make sure you have read the [Artificial Intelligence](./index.md) documentation before reading this documentation.
## Usage
Semantic Kernel can be used by resolving `IKernelAccessor` service that carries the `Kernel` instance. Kernel might be `null` if no workspace is configured. You should check the kernel before using it.
```csharp
public class MyService
{
private readonly IKernelAccessor _kernelAccessor;
public MyService(IKernelAccessor kernelAccessor)
{
_kernelAccessor = kernelAccessor;
}
public async Task<string> GetResponseAsync(string prompt)
{
var kernel = _kernelAccessor.Kernel;
if (kernel is null)
{
return "No kernel configured";
}
return await kernel.InvokeAsync(prompt);
}
}
```
### Workspaces
Workspaces are a way to configure isolated AI configurations for a named scope. You can define a workspace by decorating a class with the `WorkspaceNameAttribute` attribute that carries the workspace name.
- Workspace names must be unique.
- Workspace names cannot contain spaces _(use underscores or camelCase)_.
- Workspace names are case-sensitive.
```csharp
using Volo.Abp.AI;
[WorkspaceName("CommentSummarization")]
public class CommentSummarization
{
}
```
> [!NOTE]
> If you don't specify the workspace name, the full name of the class will be used as the workspace name.
You can resolve generic versions of `IKernelAccessor` service for a specific workspace as generic arguments. If Kernel is not configured for a workspace, you will get `null` from the accessor service. You should check the accessor before using it. This applies only for specified workspaces. Another workspace may have a configured Kernel.
`IKernelAccessor<TWorkSpace>` can be resolved to access a specific workspace's kernel. This is a typed kernel accessor and each workspace can have its own kernel configuration.
Example of resolving a typed kernel accessor:
```csharp
public class MyService
{
private readonly IKernelAccessor<CommentSummarization> _kernelAccessor;
}
public async Task<string> GetResponseAsync(string prompt)
{
var kernel = _kernelAccessor.Kernel;
if (kernel is null)
{
return "No kernel configured";
}
return await kernel.InvokeAsync(prompt);
}
}
```
## Configuration
`AbpAIWorkspaceOptions` configuration is used to configure AI workspaces and their configurations. You can configure the default workspace and also configure isolated workspaces by using the this options class.It has to be configured **before the services are configured** in the `PreConfigure` method of your module class. It is important since the services are registered after the configuration is applied.
- `AbpAIWorkspaceOptions` has a `Workspaces` property that is type of `WorkspaceConfigurationDictionary` which is a dictionary of workspace names and their configurations. It provides `Configure<T>` and `ConfigureDefault` methods to configure the default workspace and also configure isolated workspaces by using the workspace type.
- Configure method passes `WorkspaceConfiguration` object to the configure action. You can configure the `Kernel` by using the `ConfigureKernel` method.
- `ConfigureKernel()` method passes `KernelConfiguration` parameter to the configure action. You can configure the `Builder` and `BuilderConfigurers` by using the `ConfigureBuilder` method.
- `Builder` is set once and is used to build the `Kernel` instance.
- `BuilderConfigurers` is a list of actions that are applied to the `Builder` instance for incremental changes.These actions are executed in the order they are added.
To configure a kernel, you'll need a kernel connector package such as [Microsoft.SemanticKernel.Connectors.OpenAI](Microsoft.SemanticKernel.Connectors.OpenAI) to configure a kernel to use a specific LLM provider.
_The following example requires [Microsoft.SemanticKernel.Connectors.AzureOpenAI](Microsoft.SemanticKernel.Connectors.AzureOpenAI) package to be installed._
Demonstration of the default workspace configuration:
```csharp
[DependsOn(typeof(AbpAIModule))]
public class MyProjectModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAIOptions>(options =>
{
options.Workspaces.ConfigureDefault(configuration =>
{
configuration.ConfigureKernel(kernelConfiguration =>
{
kernelConfiguration.Builder = Kernel.CreateBuilder()
.AddAzureOpenAIChatClient("...", "...");
});
// Note: Chat client is not configured here
});
});
}
}
```
Demonstration of the isolated workspace configuration:
```csharp
[DependsOn(typeof(AbpAIModule))]
public class MyProjectModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAIOptions>(options =>
{
options.Workspaces.Configure<CommentSummarization>(configuration =>
{
configuration.ConfigureKernel(kernelConfiguration =>
{
kernelConfiguration.Builder = Kernel.CreateBuilder()
.AddAzureOpenAIChatClient("...", "...");
});
});
});
}
}
```
## See Also
- [Usage of Microsoft.Extensions.AI](./microsoft-extensions-ai.md)
- [AI Samples for .NET](https://learn.microsoft.com/en-us/samples/dotnet/ai-samples/ai-samples/)

2
docs/en/framework/infrastructure/index.md

@ -10,7 +10,7 @@
ABP provides a complete infrastructure for creating real world software solutions with modern architectures based on the .NET platform. Each of the following documents explains an infrastructure feature:
* [Audit Logging](./audit-logging.md)
* [Artificial Intelligence](./artificial-intelligence.md)
* [Artificial Intelligence](./artificial-intelligence/index.md)
* [Background Jobs](./background-jobs/index.md)
* [Background Workers](./background-workers/index.md)
* [BLOB Storing](./blob-storing/index.md)

38
docs/en/framework/ui/angular/component-replacement.md

@ -584,8 +584,8 @@ Open the generated `nav-items.component.html` in `src/app/nav-items` folder and
class="bg-transparent border-0 text-white"
/>
<li class="nav-item d-flex align-items-center">
@if ((dropdownLanguages$ | async)?.length > 0) {
<div
*ngIf="(dropdownLanguages$ | async)?.length > 0"
class="dropdown"
ngbDropdown
#languageDropdown="ngbDropdown"
@ -608,24 +608,21 @@ Open the generated `nav-items.component.html` in `src/app/nav-items` folder and
aria-labelledby="dropdownMenuLink"
[class.d-block]="smallScreen && languageDropdown.isOpen()"
>
<a
*ngFor="let lang of dropdownLanguages$ | async"
href="javascript:void(0)"
class="dropdown-item"
(click)="onChangeLang(lang.cultureName)"
>{%{{{ lang?.displayName }}}%}</a
>
@for (lang of dropdownLanguages$ | async; track lang.cultureName) {
<a
href="javascript:void(0)"
class="dropdown-item"
(click)="onChangeLang(lang.cultureName)"
>{%{{{ lang?.displayName }}}%}</a
>
}
</div>
</div>
}
</li>
<li class="nav-item d-flex align-items-center">
<ng-template #loginBtn>
<a role="button" class="nav-link pointer" (click)="navigateToLogin()"
>{%{{{ 'AbpAccount::Login' | abpLocalization }}}%}</a
>
</ng-template>
@if ((currentUser$ | async)?.isAuthenticated) {
<div
*ngIf="(currentUser$ | async)?.isAuthenticated; else loginBtn"
ngbDropdown
class="dropdown"
#currentUserDropdown="ngbDropdown"
@ -641,9 +638,9 @@ Open the generated `nav-items.component.html` in `src/app/nav-items` folder and
aria-haspopup="true"
aria-expanded="false"
>
<small *ngIf="(selectedTenant$ | async)?.name as tenantName"
><i>{%{{{ tenantName }}}%}</i>\</small
>
@if ((selectedTenant$ | async)?.name as tenantName) {
<small><i>{%{{{ tenantName }}}%}</i>\</small>
}
<strong>{%{{{ (currentUser$ | async)?.userName }}}%}</strong>
</a>
<div
@ -661,6 +658,13 @@ Open the generated `nav-items.component.html` in `src/app/nav-items` folder and
>
</div>
</div>
} @else {
<ng-template #loginBtn>
<a role="button" class="nav-link pointer" (click)="navigateToLogin()">
{%{{{ 'AbpAccount::Login' | abpLocalization }}}%}
</a>
</ng-template>
}
</li>
</ul>
```

2
docs/en/framework/ui/angular/data-table-column-extensions.md

@ -171,7 +171,7 @@ It has the following properties:
- **index** is the table index where the record is at.
- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `ExtensibleTableComponent`, including, but not limited to, its parent component.
- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `ExtensibleTableComponent`, including, but not limited to, its parent component.
```js
{

2
docs/en/framework/ui/angular/dynamic-form-extensions.md

@ -107,7 +107,7 @@ Extra properties defined on an existing entity will be included in the create an
It has the following properties:
- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `ExtensibleFormPropComponent`, including, but not limited to, its parent components.
- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `ExtensibleFormPropComponent`, including, but not limited to, its parent components.
```js
{

2
docs/en/framework/ui/angular/entity-action-extensions.md

@ -272,7 +272,7 @@ It has the following properties:
- **index** is the table index where the record is at.
- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `GridActionsComponent`, including, but not limited to, its parent component.
- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `GridActionsComponent`, including, but not limited to, its parent component.
```js
{

19
docs/en/framework/ui/angular/form-validation.md

@ -52,7 +52,7 @@ export const appConfig: ApplicationConfig = {
};
```
When a [validator](https://angular.io/guide/form-validation#defining-custom-validators) or an [async validator](https://angular.io/guide/form-validation#creating-asynchronous-validators) returns an error with the key given to the error blueprints (`uniqueUsername` here), the validation library will be able to display an error message after localizing according to the given key and interpolation params. The result will look like this:
When a [validator](https://angular.dev/guide/forms/form-validation) or an [async validator](https://angular.dev/guide/forms/form-validation) returns an error with the key given to the error blueprints (`uniqueUsername` here), the validation library will be able to display an error message after localizing according to the given key and interpolation params. The result will look like this:
<img alt="An already taken username is entered while creating new user and a custom error message appears under the input after validation." src="./images/form-validation---new-error-message.gif" width="990px" style="max-width:100%">
@ -146,12 +146,13 @@ import { ChangeDetectionStrategy, Component } from "@angular/core";
selector: "app-validation-error",
imports:[CommonModule, LocalizationPipe],
template: `
<div
class="font-weight-bold font-italic px-1 invalid-feedback"
*ngFor="let error of abpErrors; trackBy: trackByFn"
>
{%{{{ error.message | abpLocalization: error.interpoliteParams }}}%}
</div>
@for (error of abpErrors; track $index){
<div
class="font-weight-bold font-italic px-1 invalid-feedback"
>
{%{{{ error.message | abpLocalization: error.interpoliteParams }}}%}
</div>
}
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
@ -250,7 +251,7 @@ buildForm() {
<a ngbNavLink>{%{{ 'AbpIdentity::UserInformations' | abpLocalization }}%}</a>
<ng-template ngbNavContent>
<!-- Automatically displays all entity fields and their validation -->
<abp-extensible-form [selectedRecord]="selected"></abp-extensible-form>
<abp-extensible-form [selectedRecord]="selected" />
</ng-template>
</li>
@ -263,7 +264,7 @@ buildForm() {
<abp-checkbox
[formControl]="roleGroup.controls[roles[i].name]"
[label]="roles[i].name"
></abp-checkbox>
/>
</div>
}
</ng-template>

4
docs/en/framework/ui/angular/http-requests.md

@ -9,7 +9,7 @@
## About HttpClient
Angular has the amazing [HttpClient](https://angular.io/guide/http) for communication with backend services. It is a layer on top and a simplified representation of [XMLHttpRequest Web API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). It also is the recommended agent by Angular for any HTTP request. There is nothing wrong with using the `HttpClient` in your ABP project.
Angular has the amazing [HttpClient](https://angular.dev/guide/http/making-requests) for communication with backend services. It is a layer on top and a simplified representation of [XMLHttpRequest Web API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). It also is the recommended agent by Angular for any HTTP request. There is nothing wrong with using the `HttpClient` in your ABP project.
However, `HttpClient` leaves error handling to the caller (method). In other words, HTTP errors are handled manually and by hooking into the observer of the `Observable` returned.
@ -93,7 +93,7 @@ postFoo(body: Foo) {
}
```
You may [check here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L23) for complete `Rest.Request<T>` type, which has only a few changes compared to [HttpRequest](https://angular.io/api/common/http/HttpRequest) class in Angular.
You may [check here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L23) for complete `Rest.Request<T>` type, which has only a few changes compared to [HttpRequest](https://angular.dev/api/common/http/HttpRequest) class in Angular.
### How to Disable Default Error Handler of RestService

24
docs/en/framework/ui/angular/lazy-load-service.md

@ -44,10 +44,13 @@ The first parameter of `load` method expects a `LoadingStrategy`. If you pass a
```js
import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core';
import { inject } from '@angular/core';
import { AsyncPipe } from '@angular/common';
@Component({
template: `
<some-component *ngIf="libraryLoaded$ | async"></some-component>
@if (libraryLoaded$ | async) {
<some-component/>
}
`
})
class DemoComponent {
@ -59,7 +62,7 @@ class DemoComponent {
}
```
The `load` method returns an observable to which you can subscibe in your component or with an `async` pipe. In the example above, the `NgIf` directive will render `<some-component>` only **if the script gets successfully loaded or is already loaded before**.
The `load` method returns an observable to which you can subscibe in your component or with an `async` pipe. In the example above, the `@if(...)` directive will render `<some-component>` only **if the script gets successfully loaded or is already loaded before**.
> You can subscribe multiple times in your template with `async` pipe. The Scripts will only be loaded once.
@ -74,10 +77,13 @@ If you pass a `StyleLoadingStrategy` instance as the first parameter of `load` m
```js
import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core';
import { inject } from '@angular/core';
import { AsyncPipe } from '@angular/common';
@Component({
template: `
<some-component *ngIf="stylesLoaded$ | async"></some-component>
@if (stylesLoaded$ | async) {
<some-component/>
}
`
})
class DemoComponent {
@ -89,7 +95,7 @@ class DemoComponent {
}
```
The `load` method returns an observable to which you can subscibe in your component or with an `AsyncPipe`. In the example above, the `NgIf` directive will render `<some-component>` only **if the style gets successfully loaded or is already loaded before**.
The `load` method returns an observable to which you can subscibe in your component or with an `AsyncPipe`. In the example above, the `@if(...)` directive will render `<some-component>` only **if the style gets successfully loaded or is already loaded before**.
> You can subscribe multiple times in your template with `async` pipe. The styles will only be loaded once.
@ -126,10 +132,13 @@ A common usecase is **loading multiple scripts and/or styles before using a feat
import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core';
import { forkJoin } from 'rxjs';
import { inject } from '@angular/core';
import { AsyncPipe } from '@angular/common';
@Component({
template: `
<some-component *ngIf="scriptsAndStylesLoaded$ | async"></some-component>
@if (scriptsAndStylesLoaded$ | async) {
<some-component />
}
`
})
class DemoComponent {
@ -168,10 +177,13 @@ Another frequent usecase is **loading dependent scripts in order**:
import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core';
import { concat } from 'rxjs';
import { inject } from '@angular/core';
import { AsyncPipe } from '@angular/common';
@Component({
template: `
<some-component *ngIf="scriptsLoaded$ | async"></some-component>
@if (scriptsLoaded$ | async) {
<some-component />
}
`
})
class DemoComponent {

2
docs/en/framework/ui/angular/list-service.md

@ -126,7 +126,7 @@ Then you can place inputs to the HTML:
## Usage with Observables
You may use observables in combination with [AsyncPipe](https://angular.io/guide/observables-in-angular#async-pipe) of Angular instead. Here are some possibilities:
You may use observables in combination with [AsyncPipe](https://angular.dev/ecosystem/rxjs-interop) of Angular instead. Here are some possibilities:
```js
book$ = this.list.hookToQuery(query => this.bookService.getListByInput(query));

4
docs/en/framework/ui/angular/localization.md

@ -220,7 +220,7 @@ As of v2.9 ABP supports RTL. If you are generating a new project with v2.9 and a
### Step 1. Create Chunks for Bootstrap LTR and RTL
Find [styles configuration in angular.json](https://angular.io/guide/workspace-config#style-script-config) and make sure the chunks in your project has `bootstrap-rtl.min` and `bootstrap-ltr.min` as shown below.
Find [styles configuration in angular.json](https://angular.dev/reference/configs/workspace-config) and make sure the chunks in your project has `bootstrap-rtl.min` and `bootstrap-ltr.min` as shown below.
```json
{
@ -279,7 +279,7 @@ export class AppComponent {}
## Registering a New Locale
Since ABP has more than one language, Angular locale files load lazily using [Webpack's import function](https://webpack.js.org/api/module-methods/#import-1) to avoid increasing the bundle size and to register the Angular core using the [`registerLocaleData`](https://angular.io/api/common/registerLocaleData) function. The chunks to be included in the bundle are specified by the [Webpack's magic comments](https://webpack.js.org/api/module-methods/#magic-comments) as hard-coded. Therefore a `registerLocale` function that returns Webpack `import` function must be passed to `provideAbpCore(withOptions({...}))`.
Since ABP has more than one language, Angular locale files load lazily using [Webpack's import function](https://webpack.js.org/api/module-methods/#import-1) to avoid increasing the bundle size and to register the Angular core using the [`registerLocaleData`](https://angular.dev/api/common/registerLocaleData) function. The chunks to be included in the bundle are specified by the [Webpack's magic comments](https://webpack.js.org/api/module-methods/#magic-comments) as hard-coded. Therefore a `registerLocale` function that returns Webpack `import` function must be passed to `provideAbpCore(withOptions({...}))`.
### registerLocaleFn

24
docs/en/framework/ui/angular/modifying-the-menu.md

@ -44,7 +44,29 @@ export const appConfig: ApplicationConfig = {
Notes
- This approach works across themes. If you are using LeptonX, the brand logo component reads these values automatically; you don't need any theme-specific code.
- You can still override visuals with CSS variables if desired. See the LeptonX section for CSS overrides.
- You can still override visuals with CSS variables if desired. See the alternative approach below.
### Alternative: Using CSS Variables (LeptonX Theme)
If you're using the LeptonX theme, you can also configure the logo using CSS variables in your `styles.scss` file. This approach is specific to LeptonX and provides direct control over the logo styling.
Add the following to your `src/styles.scss`:
```scss
:root {
--lpx-logo: url('/assets/images/logo/logo-light.png');
--lpx-logo-icon: url('/assets/images/logo/logo-light-thumbnail.png');
}
```
**When to use each approach:**
| Approach | Use Case | Theme Support |
|----------|----------|-------------|
| **provideLogo** (recommended) | Cross-theme compatibility, environment-based configuration | All themes |
| **CSS Variables** | LeptonX-specific styling, fine-grained CSS control | LeptonX only |
**Recommendation:** Use the `provideLogo` approach for most cases as it's theme-independent and follows ABP's standard configuration pattern. Use CSS variables only when you need LeptonX-specific styling control or have existing CSS-based theme customizations.
## How to Add a Navigation Element

2
docs/en/framework/ui/angular/page-toolbar-extensions.md

@ -215,7 +215,7 @@ It has the following properties:
}
```
- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `PageToolbarComponent`, including, but not limited to, its parent component.
- **getInjected** is the equivalent of [Injector.get](https://angular.dev/api/core/Injector). You can use it to reach injected dependencies of `PageToolbarComponent`, including, but not limited to, its parent component.
```js
{

91
docs/en/framework/ui/angular/permission-management-component-replacement.md

@ -334,7 +334,7 @@ Open the generated `permission-management.component.html` in `src/app/permission
```html
<abp-modal [visible]="isVisible" (visibleChange)="onVisibleChange($event)" [busy]="modalBusy">
<ng-container *ngIf="data.entityDisplayName">
@if (data.entityDisplayName) {
<ng-template #abpHeader>
<h4>
{%{{{ 'AbpPermissionManagement::Permissions' | abpLocalization }}}%} -
@ -360,19 +360,22 @@ Open the generated `permission-management.component.html` in `src/app/permission
<div class="row">
<div class="overflow-scroll col-md-4">
<ul class="nav nav-pills flex-column">
<li *ngFor="let group of data.groups; trackBy: trackByFn" class="nav-item">
<a
*ngIf="{ assignedCount: getAssignedCount(group.name) } as count"
class="nav-link pointer"
[class.active]="selectedGroup?.name === group?.name"
(click)="onChangeGroup(group)"
>
<div [class.font-weight-bold]="count.assignedCount">
{%{{{ group?.displayName }}}%}
<span>({%{{{ count.assignedCount }}}%})</span>
</div>
</a>
</li>
@for (group of data.groups; track group.name) {
<li class="nav-item">
@if ({ assignedCount: getAssignedCount(group.name) } as count) {
<a
class="nav-link pointer"
[class.active]="selectedGroup?.name === group?.name"
(click)="onChangeGroup(group)"
>
<div [class.font-weight-bold]="count.assignedCount">
{%{{{ group?.displayName }}}%}
<span>({%{{{ count.assignedCount }}}%})</span>
</div>
</a>
}
</li>
}
</ul>
</div>
<div class="col-md-8 overflow-scroll">
@ -393,34 +396,36 @@ Open the generated `permission-management.component.html` in `src/app/permission
}}}%}</label>
</div>
<hr class="mb-3" />
<div
*ngFor="let permission of selectedGroupPermissions; let i = index; trackBy: trackByFn"
[ngStyle]="permission.style"
class="custom-checkbox custom-control mb-2"
>
<input
#permissionCheckbox
type="checkbox"
[checked]="getChecked(permission.name)"
[value]="getChecked(permission.name)"
[attr.id]="permission.name"
class="custom-control-input"
[disabled]="isGrantedByOtherProviderName(permission.grantedProviders)"
/>
<label
class="custom-control-label"
[attr.for]="permission.name"
(click)="onClickCheckbox(permission, permissionCheckbox.value)"
>{%{{{ permission.displayName }}}%}
<ng-container *ngIf="!hideBadges">
<span
*ngFor="let provider of permission.grantedProviders"
class="badge badge-light"
>{%{{{ provider.providerName }}}%}: {%{{{ provider.providerKey }}}%}</span
>
</ng-container>
</label>
</div>
@for (permission of selectedGroupPermissions; track permission.name; let i = $index) {
<div
[ngStyle]="permission.style"
class="custom-checkbox custom-control mb-2"
>
<input
#permissionCheckbox
type="checkbox"
[checked]="getChecked(permission.name)"
[value]="getChecked(permission.name)"
[attr.id]="permission.name"
class="custom-control-input"
[disabled]="isGrantedByOtherProviderName(permission.grantedProviders)"
/>
<label
class="custom-control-label"
[attr.for]="permission.name"
(click)="onClickCheckbox(permission, permissionCheckbox.value)"
>
{%{{{ permission.displayName }}}%}
@if (!hideBadges) {
@for (provider of permission.grantedProviders; track provider.providerKey) {
<span class="badge badge-light">
{%{{{ provider.providerName }}}%}: {%{{{ provider.providerKey }}}%}
</span>
}
}
</label>
</div>
}
</div>
</div>
</div>
@ -433,7 +438,7 @@ Open the generated `permission-management.component.html` in `src/app/permission
'AbpIdentity::Save' | abpLocalization
}}}%}</abp-button>
</ng-template>
</ng-container>
}
</abp-modal>
```

8
docs/en/framework/ui/angular/pwa-configuration.md

@ -37,7 +37,7 @@ Here is the output of the command:
So, Angular CLI updates some files and add a few others:
- **ngsw-config.json** is where the [service worker configuration](https://angular.io/guide/service-worker-config) is placed. Not all PWAs have this file. It is specific to Angular.
- **ngsw-config.json** is where the [service worker configuration](https://angular.dev/ecosystem/service-workers/config) is placed. Not all PWAs have this file. It is specific to Angular.
- **manifest.webmanifest** is a [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) and provides information about your app in JSON format.
- **icons** are placeholder icons that are referred to in your web app manifest. We will replace these in a minute.
- **angular.json** has following modifications:
@ -45,7 +45,7 @@ So, Angular CLI updates some files and add a few others:
- `serviceWorker` is `true` in production build.
- `ngswConfigPath` refers to _ngsw-config.json_.
- **package.json** has _@angular/service-worker_ as a new dependency.
- **app.config.ts** imports `ServiceWorkerModule` and registers a service worker filename.
- **app.config.ts** The `provideServiceWorker` provider is imported to register the service worker script.
- **index.html** has following modifications:
- A `<link>` element that refers to _manifest.webmanifest_.
- A `<meta>` tag that sets a theme color.
@ -342,8 +342,8 @@ Open _ngsw-config.json_ file and replace its content with this:
}
```
In case you want to cache other static files, please refer to the [service worker configuration document](https://angular.io/guide/service-worker-config#assetgroups) on Angular.io.
In case you want to cache other static files, please refer to the [service worker configuration document](https://angular.dev/ecosystem/service-workers/config) on Angular.dev.
### 3.2 Set Data Groups
This part is unique to your project. We recommend being very careful about which endpoints to cache. Please refer to [service worker configuration document](https://angular.io/guide/service-worker-config#datagroups) on Angular.io for details.
This part is unique to your project. We recommend being very careful about which endpoints to cache. Please refer to [service worker configuration document](https://angular.dev/ecosystem/service-workers/config) on Angular.dev for details.

22
docs/en/framework/ui/angular/quick-start.md

@ -84,10 +84,10 @@ Now let us take a look at the contents of the source folder.
- **app.config.ts** is the [root configuration](https://angular.dev/api/platform-browser/bootstrapApplication) that includes information about how parts of your application are related and what to run at the initiation of your application.
- **route.provider.ts** is used for [modifying the menu](../angular/modifying-the-menu.md).
- **assets** is for static files. A file (e.g. an image) placed in this folder will be available as is when the application is served.
- **environments** includes one file per environment configuration. There are two configurations by default, but you may always introduce another one. These files are directly referred to in _angular.json_ and help you have different builds and application variables. Please refer to [configuring Angular application environments](https://angular.io/guide/build#configuring-application-environments) for details.
- **environments** includes one file per environment configuration. There are two configurations by default, but you may always introduce another one. These files are directly referred to in _angular.json_ and help you have different builds and application variables. Please refer to [configuring Angular application environments](https://angular.dev/tools/cli/environments) for details.
- **index.html** is the HTML page served to visitors and will contain everything required to run your application. Servers should be configured to redirect every request to this page so that the Angular router can take over. Do not worry about how to add JavaScript and CSS files to it, because Angular CLI will do it automatically.
- **main.ts** bootstraps and configures Angular application to run in the browser. It is production-ready, so forget about it.
- **polyfill.ts** is where you can add polyfills if you want to [support legacy browsers](https://angular.io/guide/browser-support).
- **polyfill.ts** is where you can add polyfills if you want to [support legacy browsers](https://angular.dev/reference/versions).
- **style.scss** is the default entry point for application styles. You can change this or add new entry points in _angular.json_.
- **test.ts** helps the unit test runner discover and bootstrap spec files.
@ -106,11 +106,11 @@ Now that you know about the files and folders, we can get the application up and
<img alt="New ABP Angular project home page" src="./images/quick-start---new-project-home-page.png" width="744px" style="max-width:100%">
You may modify the behavior of the **start script** (in the package.json file) by changing the parameters passed to the `ng serve` command. For instance, if you do not want a browser window to open next time you run the script, remove `--open` from the end of it. Please check [ng serve documentation](https://angular.io/cli/serve) for all available options.
You may modify the behavior of the **start script** (in the package.json file) by changing the parameters passed to the `ng serve` command. For instance, if you do not want a browser window to open next time you run the script, remove `--open` from the end of it. Please check [ng serve documentation](https://angular.dev/cli/serve) for all available options.
### Angular Live Development Server
The development server of Angular is based on [Webpack DevServer](https://webpack.js.org/configuration/dev-server/). It tracks changes to source files and syncs the browser window after an incremental re-compilation every time <sup id="a-dev-server">[2](#f-dev-server)</sup> you make one. Your experience will be like this:
The development server runs via Angular's Application Builder and uses a fast, modern dev server under the hood. It tracks changes to source files and refreshes the browser after an incremental compilation every time <sup id="a-dev-server">[2](#f-dev-server)</sup> you make one. Your experience will be like this:
<img alt="Angular Live Development Server compiles again on template change and removes a button from the page displayed by the browser." src="./images/quick-start---angular-live-development-server.gif" width="818px" style="max-width:100%">
@ -122,13 +122,13 @@ Please keep in mind that you should not use this server in production. To provid
<sup id="f-certificate-error"><b>1</b></sup> _If you see the error above when you run the Angular app, your browser might be blocking access to the API because of the self-signed certificate. Visit that address and allow access to it (once). When you see the Swagger interface, you are good to go._ <sup>[↩](#a-certificate-error)</sup>
<sup id="f-dev-server"><b>2</b></sup> _Sometimes, depending on the file changed, Webpack may miss the change and cannot reflect it in the browser. For example, tsconfig files are not being tracked. In such a case, please restart the development server._ <sup>[↩](#a-dev-server)</sup>
<sup id="f-dev-server"><b>2</b></sup> _Sometimes, depending on the file changed, the development server may not pick up the change (for example, certain configuration files like tsconfig are not watched). In such a case, please restart the development server._ <sup>[↩](#a-dev-server)</sup>
---
## How to Build the Angular Application
An Angular application can have multiple [build targets](https://angular.io/guide/glossary#target), i.e. **configurations in angular.json** which define how [Architect](https://angular.io/guide/glossary#architect) will build applications and libraries. Usually, each build configuration has a separate environment variable file. Currently, the project has two: One for development and one for production.
An Angular application can have multiple build targets, i.e. **configurations in angular.json** which define how [Architect](https://angular.dev/reference/configs/workspace-config) will build applications and libraries. Usually, each build configuration has a separate environment variable file. Currently, the project has two: One for development and one for production.
```js
// this is what environment variables look like
@ -161,7 +161,7 @@ export const environment = {
} as Config.Environment;
```
When you run the development server, variables defined in _environment.ts_ take effect. Similarly, in production mode, the default environment is replaced by _environment.prod.ts_ and completely different variables become effective. You may even [create a new build configuration](https://angular.dev/reference/configs/workspace-config#alternate-build-configurations) and set [file replacements](https://angular.io/guide/build#configure-target-specific-file-replacements) to use a completely new environment. For now, we will start a production build:
When you run the development server, variables defined in _environment.ts_ take effect. Similarly, in production mode, the default environment is replaced by _environment.prod.ts_ and completely different variables become effective. You may even [create a new build configuration](https://angular.dev/reference/configs/workspace-config#alternate-build-configurations) and set [file replacements](https://angular.dev/tools/cli/environments) to use a completely new environment. For now, we will start a production build:
1. Open your terminal and navigate to the root Angular folder.
2. Run `yarn` or `npm install` if you have not installed dependencies already.
@ -180,18 +180,18 @@ Angular web applications run on the browser and require no server except for a [
```shell
# please replace MyProjectName with your project name
npx servor dist/MyProjectName index.html 4200 --browse
npx servor dist/MyProjectName/browser index.html 4200 --browse
```
This command will download and start a simple static server, a browser window at `http://localhost:4200` will open, and the compiled output of your project will be served.
Of course, you need your application to run on an optimized web server and become available to everyone. This is quite straight-forward:
1. Create a new static web server instance. You can use a service like [Azure App Service](https://azure.microsoft.com/en-us/services/app-service/web/), [Firebase](https://firebase.google.com/docs/hosting), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or even [GitHub Pages](https://angular.io/guide/deployment#deploy-to-github-pages). Another option is maintaining own web server with [NGINX](https://www.nginx.com/), [IIS](https://www.iis.net/), [Apache HTTP Server](https://httpd.apache.org/), or equivalent.
1. Create a new static web server instance. You can use a service like [Azure App Service](https://azure.microsoft.com/en-us/services/app-service/web/), [Firebase](https://firebase.google.com/docs/hosting), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or even [GitHub Pages](https://angular.dev/tools/cli/deployment). Another option is maintaining own web server with [NGINX](https://www.nginx.com/), [IIS](https://www.iis.net/), [Apache HTTP Server](https://httpd.apache.org/), or equivalent.
2. Copy the files from `dist/MyProjectName` <sup id="a-dist-folder-name">[1](#f-dist-folder-name)</sup> to a publicly served destination on the server via CLI of the service provider, SSH, or FTP (whichever is available). This step would be defined as a job if you have a CI/CD flow.
3. [Configure the server](https://angular.io/guide/deployment#server-configuration) to redirect all requests to the _index.html_ file. Some services do that automatically. Others require you [to add a file to the bundle via assets](https://angular.io/guide/workspace-config#assets-configuration) which describes the server how to do the redirections. Occasionally, you may need to do manual configuration.
3. [Configure the server](https://angular.dev/tools/cli/deployment#server-configuration) to redirect all requests to the _index.html_ file. Some services do that automatically. Others require you [to add a file to the bundle via assets](https://angular.dev/reference/configs/workspace-config) which describes the server how to do the redirections. Occasionally, you may need to do manual configuration.
In addition, you can [deploy your application to certain targets using the Angular CLI](https://angular.io/guide/deployment#automatic-deployment-with-the-cli). Here are some deploy targets:
In addition, you can [deploy your application to certain targets using the Angular CLI](https://angular.dev/tools/cli/deployment#automatic-deployment-with-the-cli). Here are some deploy targets:
- [Azure](https://github.com/Azure/ng-deploy-azure#readme)
- [Firebase](https://github.com/angular/angularfire#readme)

2
docs/en/framework/ui/angular/router-events.md

@ -7,7 +7,7 @@
# Router Events Simplified
`RouterEvents` is a utility service for filtering specific router events and reacting to them. Please see [this page in Angular docs](https://angular.io/api/router/Event) for available router events.
`RouterEvents` is a utility service for filtering specific router events and reacting to them. Please see [this page in Angular docs](https://angular.dev/api/router/Event) for available router events.
## Benefit

10
docs/en/framework/ui/angular/service-proxies.md

@ -114,7 +114,7 @@ export class BookComponent implements OnInit {
}
```
The Angular compiler removes the services that have not been injected anywhere from the final output. See the [tree-shakable providers documentation](https://angular.io/guide/dependency-injection-providers#tree-shakable-providers).
The Angular compiler removes the services that have not been injected anywhere from the final output. See the [tree-shakable providers documentation](https://angular.dev/guide/di/defining-dependency-providers).
### Models
@ -152,9 +152,11 @@ export class BookComponent implements OnInit {
<!-- simplified for sake of clarity -->
<select formControlName="genre">
<option [ngValue]="null">Select a genre</option>
<option *ngFor="let genre of genres" [ngValue]="genre.value">
{%{{{ genre.key }}}%}
</option>
@for (genre of genres; track genre.value) {
<option [ngValue]="genre.value">
{%{{{ genre.key }}}%}
</option>
}
</select>
```

280
docs/en/framework/ui/angular/ssr-configuration.md

@ -0,0 +1,280 @@
```json
//[doc-seo]
{
"Description": "Learn how to configure Server-Side Rendering (SSR) for your Angular application in the ABP Framework to improve performance and SEO."
}
```
# SSR Configuration
[Server-Side Rendering (SSR)](https://angular.io/guide/ssr) is a process that involves rendering pages on the server, resulting in initial HTML content that contains the page state. This allows the browser to show the page to the user immediately, before the JavaScript bundles are downloaded and executed.
SSR improves the **performance** (First Contentful Paint) and **SEO** (Search Engine Optimization) of your application.
## 1. Install ABP Angular SSR
The ABP Framework provides a schematic to easily add SSR support to your Angular application.
Run the following command in the root folder of your Angular application:
```shell
yarn ng generate @abp/ng.schematics:ssr-add
```
Alternatively, you can specify the project name if you have a multi-project workspace:
```shell
yarn ng generate @abp/ng.schematics:ssr-add --project MyProjectName
```
This command automates the setup process by installing necessary dependencies, creating server-side entry points, and updating your configuration files.
## 2. What Changes?
When you run the schematic, it performs the following actions:
### 2.1. Dependencies
It adds the following packages to your `package.json`:
- **express**: A minimal and flexible Node.js web application framework.
- **@types/express**: Type definitions for Express.
- **openid-client**: A library for OpenID Connect (OIDC) relying party (RP) implementation, used for authentication on the server.
```json
{
"dependencies": {
"express": "^4.18.2",
"openid-client": "^5.6.4"
},
"devDependencies": {
"@types/express": "^4.17.17"
}
}
```
**For Webpack projects only:**
- **browser-sync** (Dev dependency): Used for live reloading during development.
### 2.2. Scripts & Configuration
The changes depend on the builder used in your project (Application Builder or Webpack).
#### Application Builder (esbuild)
If your project uses the **Application Builder** (`@angular/build:application`), the schematic:
- **Scripts**: Adds `serve:ssr:project-name` to serve the SSR application.
- **angular.json**: Updates the `build` target to enable SSR (`outputMode: 'server'`) and sets the SSR entry point.
```json
{
"projects": {
"MyProjectName": {
"architect": {
"build": {
"options": {
"outputPath": "dist/MyProjectName",
"outputMode": "server",
"ssr": {
"entry": "src/server.ts"
}
}
}
}
}
}
}
```
- **tsconfig**: Updates the application's `tsconfig` to include `server.ts`.
#### Webpack Builder
If your project uses the **Webpack Builder** (`@angular-devkit/build-angular:browser`), the schematic:
- **Scripts**: Adds `dev:ssr`, `serve:ssr`, `build:ssr`, and `prerender` scripts.
- **angular.json**: Adds new targets: `server`, `serve-ssr`, and `prerender`.
- **tsconfig**: Updates the server's `tsconfig` to include `server.ts`.
### 2.3. Files
- **server.ts**: This file is the main entry point for the server-side application.
- **Standalone Projects**: Generates a server entry point compatible with `bootstrapApplication`.
- **NgModule Projects**: Generates a server entry point compatible with `platformBrowserDynamic`.
```typescript
import {
AngularNodeAppEngine,
createNodeRequestHandler,
isMainModule,
writeResponseToNodeResponse,
} from '@angular/ssr/node';
import express from 'express';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { environment } from './environments/environment';
import { ServerCookieParser } from '@abp/ng.core';
import * as oidc from 'openid-client';
// ... (OIDC configuration and setup)
const app = express();
const angularApp = new AngularNodeAppEngine();
// ... (OIDC routes: /authorize, /logout, /)
/**
* Serve static files from /browser
*/
app.use(
express.static(browserDistFolder, {
maxAge: '1y',
index: false,
redirect: false,
}),
);
/**
* Handle all other requests by rendering the Angular application.
*/
app.use((req, res, next) => {
angularApp
.handle(req)
.then(response => {
if (response) {
res.cookie('ssr-init', 'true', {...secureCookie, httpOnly: false});
return writeResponseToNodeResponse(response, res);
} else {
return next()
}
})
.catch(next);
});
// ... (Start server logic)
export const reqHandler = createNodeRequestHandler(app);
```
- **app.routes.server.ts**: Defines server-side routes and render modes (e.g., Prerender, Server, Client). This allows fine-grained control over how each route is rendered.
```typescript
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
{
path: '**',
renderMode: RenderMode.Server
}
];
```
- **app.config.server.ts**: Merges the application configuration with server-specific providers.
```typescript
import { mergeApplicationConfig, ApplicationConfig, provideAppInitializer, inject, PLATFORM_ID, TransferState } from '@angular/core';
import { isPlatformServer } from '@angular/common';
import { provideServerRendering, withRoutes } from '@angular/ssr';
import { appConfig } from './app.config';
import { serverRoutes } from './app.routes.server';
import { SSR_FLAG } from '@abp/ng.core';
const serverConfig: ApplicationConfig = {
providers: [
provideAppInitializer(() => {
const platformId = inject(PLATFORM_ID);
const transferState = inject<TransferState>(TransferState);
if (isPlatformServer(platformId)) {
transferState.set(SSR_FLAG, true);
}
}),
provideServerRendering(withRoutes(serverRoutes)),
],
};
export const config = mergeApplicationConfig(appConfig, serverConfig);
```
- **index.html**: Removes the loading spinner (`<div id="lp-page-loader"></div>`) to prevent hydration mismatches.
## 3. Running the Application
After the installation is complete, you can run your application with SSR support.
### Application Builder
To serve the application with SSR in development:
```shell
yarn start
# or
yarn ng serve
```
To serve the built application (production):
```shell
yarn run serve:ssr:project-name
```
### Webpack Builder
**Development:**
```shell
yarn run dev:ssr
```
**Production:**
```shell
yarn run build:ssr
yarn run serve:ssr
```
## 4. Authentication & SSR
The schematic installs `openid-client` to handle authentication on the server side. This ensures that when a user accesses a protected route, the server can validate their session or redirect them to the login page before rendering the content.
> Ensure your OpenID Connect configuration (in `environment.ts` or `app.config.ts`) is compatible with the server environment.
## 5. Deployment
To deploy your Angular SSR application to a production server, follow these steps:
### 5.1. Build the Application
Run the build command to generate the production artifacts:
```shell
yarn build
# or if using Webpack builder
yarn run build:ssr
```
### 5.2. Prepare Artifacts
After the build is complete, you will find the output in the `dist` folder.
For the **Application Builder**, the output structure typically looks like this:
```
dist/MyProjectName/
├── browser/ # Client-side bundles
└── server/ # Server-side bundles and entry point (server.mjs)
```
You need to copy the entire `dist/MyProjectName` folder to your server.
### 5.3. Run the Server
On your server, navigate to the folder where you copied the artifacts and run the server using Node.js:
```shell
node server/server.mjs
```
> [!TIP]
> It is recommended to use a process manager like [PM2](https://pm2.keymetrics.io/) to keep your application alive and handle restarts.
```shell
pm2 start server/server.mjs --name "my-app"
```

2
docs/en/framework/ui/angular/subscription-service.md

@ -7,7 +7,7 @@
# Managing RxJS Subscriptions
`SubscriptionService` is a utility service to provide an easy unsubscription from RxJS observables in Angular components and directives. Please see [why you should unsubscribe from observables on instance destruction](https://angular.io/guide/lifecycle-hooks#cleaning-up-on-instance-destruction).
`SubscriptionService` is a utility service to provide an easy unsubscription from RxJS observables in Angular components and directives. Please see [why you should unsubscribe from observables on instance destruction](https://angular.dev/guide/components/lifecycle).
## Getting Started

2
docs/en/framework/ui/angular/testing.md

@ -7,7 +7,7 @@
# Unit Testing Angular UI
ABP Angular UI is tested like any other Angular application. So, [the guide here](https://angular.io/guide/testing) applies to ABP too. That said, we would like to point out some **unit testing topics specific to ABP Angular applications**.
ABP Angular UI is tested like any other Angular application. So, [the guide here](https://angular.dev/guide/testing) applies to ABP too. That said, we would like to point out some **unit testing topics specific to ABP Angular applications**.
## Setup

8
docs/en/framework/ui/angular/theming.md

@ -81,8 +81,8 @@ You can run the following command in **Angular** project directory to copy the s
### Global/Component Styles
Angular can bundle global style files and component styles with components.
See the [component styles](https://angular.io/guide/component-styles) guide on Angular documentation for more information.
Angular can bundle global style files and component styles with components.
See the [component styles](https://angular.dev/guide/components/styling) guide on Angular documentation for more information.
### Layout Parts
@ -238,8 +238,10 @@ import { Router } from '@angular/router';
selector: 'abp-current-user-test',
template: `
<a class="dropdown-item pointer" (click)="data.action()">
<i *ngIf="data.textTemplate.icon" [class]="data.textTemplate.icon"></i>
@if (data.textTemplate.icon){
<i [class]="data.textTemplate.icon"></i>
{%{{{ data.textTemplate.text | abpLocalization }}}%}
}
</a>
`,
})

38
docs/en/framework/ui/angular/track-by-service.md

@ -5,9 +5,9 @@
}
```
# Easy *ngFor trackBy
# Easy @for() track
`TrackByService` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.io/guide/template-syntax#ngfor-with-trackby) for its purpose.
`TrackByService` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.dev/guide/templates/control-flow) for its purpose.
@ -54,8 +54,9 @@ You can use `by` to get a `TrackByFunction` that tracks the iterated object base
```html
<!-- template of DemoComponent -->
<div *ngFor="let item of list; trackBy: track.by('id')">{%{{{ item.name }}}%}</div>
@for (item of list; track: track.by('id')) {
<div>{%{{{ item.name }}}%}</div>
}
```
@ -67,11 +68,11 @@ import { trackBy } from "@abp/ng.core";
@Component({
template: `
<div
*ngFor="let item of list; trackBy: trackById"
>
{%{{{ item.name }}}%}
</div>
@for (item of list; track: trackById) {
<div>
{%{{{ item.name }}}%}
</div>
}
`,
})
class DemoComponent {
@ -89,12 +90,11 @@ You can use `byDeep` to get a `TrackByFunction` that tracks the iterated object
```html
<!-- template of DemoComponent -->
<div
*ngFor="let item of list; trackBy: track.byDeep('tenant', 'account', 'id')"
>
{%{{{ item.tenant.name }}}%}
</div>
@for (item of list; track: track.byDeep('tenant', 'account', 'id')) {
<div >
{%{{{ item.tenant.name }}}%}
</div>
}
```
@ -106,11 +106,11 @@ import { trackByDeep } from "@abp/ng.core";
@Component({
template: `
<div
*ngFor="let item of list; trackBy: trackByTenantAccountId"
>
{%{{{ item.name }}}%}
@for (item of list; track: trackByTenantAccountId) {
<div>
{%{{{ item.name }}}%}
</div>
}
`,
})
class DemoComponent {

2
docs/en/get-started/empty-aspnet-core-application.md

@ -11,7 +11,7 @@ This tutorial explains how to start ABP from scratch with minimal dependencies.
## Create a New Project
1. Create a new AspNet Core Web Application with Visual Studio 2022 (17.0.0+):
1. Create a new AspNet Core Web Application with Visual Studio 2026 (18.0.0+):
![](../images/create-new-aspnet-core-application-v2.png)

11
docs/en/get-started/layered-web-application.md

@ -22,8 +22,8 @@ In this quick start guide, you will learn how to create and run a layered (and p
First things first! Let's setup your development environment before creating the first project. The following tools should be installed on your development machine:
* [Visual Studio 2022](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 9.0+](https://dotnet.microsoft.com/download/dotnet) development.
* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }}
* [Visual Studio 2026](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 10.0+](https://dotnet.microsoft.com/download/dotnet) development.
* [.NET 10.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }}
* [Node v22.11+](https://nodejs.org/){{ end }}{{ if UI == "NG" }}
* [Yarn v1.22+ (not v2+)](https://classic.yarnpkg.com/en/docs/install) or npm v10+ (already installed with Node){{ end }}
* [Docker Desktop](https://www.docker.com/products/docker-desktop/)
@ -276,4 +276,9 @@ You can start the following application(s):
> For example in non-tiered MVC with public website application:
![solution-runner-public-website](images/solution-runner-public-website.png)
![solution-runner-public-website](images/solution-runner-public-website.png)
## What's next?
- [TODO Application Tutorial with Layered Solution](../tutorials/todo/layered/index.md)
- [Web Application Development Tutorial](../tutorials/book-store/index.md)

4
docs/en/get-started/microservice.md

@ -15,8 +15,8 @@ In this quick start guide, you will learn how to create and run a microservice s
First things first! Let's setup your development environment before creating the first project. The following tools should be installed on your development machine:
* [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or another IDE that supports .NET development
* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet)
* [Visual Studio 2026](https://visualstudio.microsoft.com/vs/) or another IDE that supports .NET development
* [.NET 10.0+](https://dotnet.microsoft.com/en-us/download/dotnet)
* [Node v22.11+](https://nodejs.org/)
* [Yarn v1.22+ (not v2+)](https://classic.yarnpkg.com/en/docs/install) or npm v10+ (already installed with Node), **This is required for the Angular applications.**
* [Docker Desktop (with Kubernetes enabled)](https://www.docker.com/products/docker-desktop/)

8
docs/en/get-started/single-layer-web-application.md

@ -21,8 +21,8 @@ In this quick start guide, you will learn how to create and run a single layer w
First things first! Let's setup your development environment before creating the first project. The following tools should be installed on your development machine:
* [Visual Studio 2022](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 9.0+](https://dotnet.microsoft.com/download/dotnet) development.
* [.NET 9.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }}
* [Visual Studio 2026](https://visualstudio.microsoft.com/) or another IDE that supports [.NET 10.0+](https://dotnet.microsoft.com/download/dotnet) development.
* [.NET 10.0+](https://dotnet.microsoft.com/en-us/download/dotnet){{ if UI != "Blazor" }}
* [Node v22.11+](https://nodejs.org/){{ end }}{{ if UI == "NG" }}
* [Yarn v1.22+ (not v2+)](https://classic.yarnpkg.com/en/docs/install) or npm v10+ (already installed with Node){{ end }}
@ -185,3 +185,7 @@ You can then hit *F5* or *Ctrl + F5* to run the web application. It will run and
![bookstore-browser-users-page](images/no-layers-bookstore-browser-users-page_dark.png)
You can use `admin` as username and `1q2w3E*` as default password to login to the application.
## What's next?
- [TODO Application Tutorial with Single-Layer Solution](../tutorials/todo/single-layer/index.md)

BIN
docs/en/images/abp-overall-diagram-1600.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 KiB

After

Width:  |  Height:  |  Size: 559 KiB

BIN
docs/en/images/db-options.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
docs/en/images/elsa-studio-wasm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/en/images/ui-options.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

71
docs/en/modules/ai-management/index.md

@ -9,8 +9,11 @@
> You must have an ABP Team or a higher license to use this module.
This module implements AI (Artificial Intelligence) management capabilities on top of the [Artificial Intelligence Workspaces](../../framework/infrastructure/artificial-intelligence.md) feature of the ABP Framework and allows to manage workspaces dynamically from the application including UI components and API endpoints.
> **⚠️ Important Notice**
> The **AI Management Module** is currently in **preview** and not yet production-ready. The documentation and implementation are subject to change.
> We recommend using this module for **evaluation and experimentation** only, not in production environments for now.
This module implements AI (Artificial Intelligence) management capabilities on top of the [Artificial Intelligence Workspaces](../../framework/infrastructure/artificial-intelligence/index.md) feature of the ABP Framework and allows to manage workspaces dynamically from the application including UI components and API endpoints.
## How to Install
@ -75,7 +78,7 @@ The AI Management module includes a built-in chat interface for testing workspac
* Test streaming responses
* Verify workspace configuration before using in production
> Access the chat interface at: `/AIManagement/Chat`
> Access the chat interface at: `/AIManagement/Workspaces/{WorkspaceName}`
## Workspace Configuration
@ -134,7 +137,7 @@ PreConfigure<AbpAIWorkspaceOptions>(options =>
#### Dynamic Workspaces
* **Created through the UI** or programmatically via `IWorkspaceRepository`
* **Created through the UI** or programmatically via `ApplicationWorkspaceManager` and `IWorkspaceRepository`
* **Fully manageable** - can be created, updated, activated/deactivated, and deleted
* **Stored in database** with all configuration
* **Ideal for** user-customizable AI features
@ -142,15 +145,30 @@ PreConfigure<AbpAIWorkspaceOptions>(options =>
Example (data seeding):
```csharp
var workspace = new Workspace(
name: "CustomerSupportWorkspace",
provider: "OpenAI",
modelName: "gpt-4",
apiKey: "your-api-key"
);
workspace.ApplicationName = ApplicationInfoAccessor.ApplicationName;
workspace.SystemPrompt = "You are a helpful customer support assistant.";
await _workspaceRepository.InsertAsync(workspace);
public class WorkspaceDataSeederContributor : IDataSeedContributor, ITransientDependency
{
private readonly IWorkspaceRepository _workspaceRepository;
private readonly ApplicationWorkspaceManager _applicationWorkspaceManager;
public WorkspaceDataSeederContributor(
IWorkspaceRepository workspaceRepository,
ApplicationWorkspaceManager applicationWorkspaceManager)
{
_workspaceRepository = workspaceRepository;
_applicationWorkspaceManager = applicationWorkspaceManager;
}
public async Task SeedAsync(DataSeedContext context)
{
var workspace = await _applicationWorkspaceManager.CreateAsync(
name: "CustomerSupportWorkspace",
provider: "OpenAI",
modelName: "gpt-4");
workspace.ApiKey = "your-api-key";
workspace.SystemPrompt = "You are a helpful customer support assistant.";
await _workspaceRepository.InsertAsync(workspace);
}
```
### Workspace Naming Rules
@ -176,12 +194,13 @@ The AI Management module defines the following permissions:
In addition to module-level permissions, you can restrict access to individual workspaces by setting the `RequiredPermissionName` property:
```csharp
var workspace = new Workspace(
var workspace = await _applicationWorkspaceManager.CreateAsync(
name: "PremiumWorkspace",
provider: "OpenAI",
modelName: "gpt-4",
requiredPermissionName: "MyApp.PremiumFeatures"
modelName: "gpt-4"
);
// Set a specific permission for the workspace
workspace.RequiredPermissionName = MyAppPermissions.AccessPremiumWorkspaces;
```
When a workspace has a required permission:
@ -248,7 +267,7 @@ public class MyService
}
```
> See [Artificial Intelligence](../../framework/infrastructure/artificial-intelligence.md) documentation for more details about workspace configuration.
> See [Artificial Intelligence](../../framework/infrastructure/artificial-intelligence/index.md) documentation for more details about workspace configuration.
### Scenario 2: AI Management with Domain Layer Dependency (Local Execution)
@ -562,14 +581,14 @@ After implementing and registering your factory:
2. **Through Code** (data seeding):
```csharp
await _workspaceRepository.InsertAsync(new Workspace(
GuidGenerator.Create(),
"MyOllamaWorkspace",
provider: "Ollama",
modelName: "mistral",
apiBaseUrl: "http://localhost:11434",
description: "Local Ollama workspace"
));
var workspace = await _applicationWorkspaceManager.CreateAsync(
name: "MyOllamaWorkspace",
provider: "Ollama",
modelName: "mistral"
);
workspace.ApiBaseUrl = "http://localhost:11434";
workspace.Description = "Local Ollama workspace";
await _workspaceRepository.InsertAsync(workspace);
```
> **Tip**: The provider name you use in `AddFactory<TFactory>("ProviderName")` must match the provider name stored in the workspace configuration in the database.
@ -626,6 +645,6 @@ The cache is automatically invalidated when workspaces are created, updated, or
## See Also
- [Artificial Intelligence Infrastructure](../../framework/infrastructure/artificial-intelligence.md): Learn about the underlying AI workspace infrastructure
- [Artificial Intelligence Infrastructure](../../framework/infrastructure/artificial-intelligence/index.md): Learn about the underlying AI workspace infrastructure
- [Microsoft.Extensions.AI](https://learn.microsoft.com/en-us/dotnet/ai/): Microsoft's unified AI abstractions
- [Semantic Kernel](https://learn.microsoft.com/en-us/semantic-kernel/): Microsoft's Semantic Kernel integration
- [Semantic Kernel](https://learn.microsoft.com/en-us/semantic-kernel/): Microsoft's Semantic Kernel integration

85
docs/en/modules/elsa-pro.md

@ -1,10 +1,17 @@
```json
//[doc-seo]
{
"Description": "Integrate Elsa Workflows into your ABP applications with this Pro module. Learn installation and setup for seamless workflow management."
}
```
# Elsa Module (Pro)
> You must have an ABP Team or a higher license to use this module.
This module integrates [Elsa Workflows](https://docs.elsaworkflows.io/) into ABP Framework applications and is designed to make it easy for developers to use Elsa's capabilities within their ABP-based projects. For creating, managing, and customizing workflows themselves, please refer to [the official Elsa documentation](https://docs.elsaworkflows.io/).
## How to install
## How to Install
The Elsa module is not installed in [the startup templates](../solution-templates/layered-web-application) by default and must be installed manually. There are two ways of installing a module into your application and each one of these approaches is explained in the next sections.
@ -37,6 +44,23 @@ After adding the package references, open the module class of the project (e.g.:
> If you are using Blazor Web App, you need to add the `Volo.Elsa.Admin.Blazor.WebAssembly` package to the **{ProjectName}.Blazor.Client.csproj** project and add the `Volo.Elsa.Admin.Blazor.Server` package to the **{ProjectName}.Blazor.csproj** project.
### `AbpElsaAspNetCoreModule` and `AbpElsaIdentityModule`
These two modules generally will be added to your authentication project. Please add `Volo.Elsa.Abp.AspNetCore` and `Volo.Elsa.Abp.Identity` packages to your project and add the `AbpElsaAspNetCoreModule` and `AbpElsaIdentityModule` to the `DependsOn` attribute of your module class based on your project structure:
```xml
<PackageReference Include="Volo.Abp.Elsa.AspNetCore" Version="x.x.x" />
<PackageReference Include="Volo.Abp.Elsa.Identity" Version="x.x.x" />
```
```csharp
[DependsOn(
//...
typeof(AbpElsaAspNetCoreModule),
typeof(AbpElsaIdentityModule)
)]
```
## The Elsa Module
The Elsa Workflows has its own database provider, and also has a Tenant/Role/User system. They are under active development, so the ABP Elsa module is not yet fully integrated. Below is the current status of each module in the ABP's Elsa Module:
@ -56,6 +80,49 @@ The rest of the projects/modules are basically empty and will be implemented in
- `AbpElsaBlazorWebAssemblyModule(Volo.Elsa.Abp.Blazor.WebAssembly)`
- `AbpElsaWebModule(Volo.Elsa.Abp.Web)`
## Configure the Elsa Server
You need to configure Elsa in your ABP application to use its features. You can do that in the `ConfigureServices` method of your `YourElsaAppModule` class as shown below:
> For more information about configuring Elsa, please refer to [the official Elsa documentation](https://docs.elsaworkflows.io/).
```cs
private void ConfigureElsa(ServiceConfigurationContext context, IConfiguration configuration)
{
var connectionString = configuration.GetConnectionString("Default")!;
context.Services
.AddElsa(elsa => elsa
.UseAbpIdentity(identity => // Use UseAbpIdentity instead of UseIdentity to integrate with ABP Identity module
{
identity.TokenOptions = options => options.SigningKey = "large-signing-key-for-signing-JWT-tokens";
})
.UseWorkflowManagement(management => management.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
.UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
.UseScheduling()
.UseJavaScript()
.UseLiquid()
.UseCSharp()
.UseHttp(http => http.ConfigureHttpOptions = options => configuration.GetSection("Http").Bind(options))
.UseWorkflowsApi()
.AddActivitiesFrom<YourElsaAppModule>()
.AddWorkflowsFrom<YourElsaAppModule>()
);
}
```
## Elsa Database Migration
Elsa module uses its own database context and migration system, ABP Elsa module doesn't contain any `aggregate root/entity` at the moment. So, **you don't need to create any initial migration for Elsa module**. You just need to configure the Elsa Services as follows:
```cs
.UseWorkflowManagement(management => management.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
.UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
```
When you run your application, Elsa will create its own database tables if they do not exist.
> See [how to configure Elsa Workflows to use different database providers for persistence, including SQL Server, PostgreSQL, and MongoDB](https://docs.elsaworkflows.io/getting-started/database-configuration) for more information.
### Elsa Module Permissions
The Elsa Workflow API endpoints check permissions. Also, it has a `*` wildcard permission to allow all permissions.
@ -72,14 +139,24 @@ You can also grant parts of the permissions to a role or user. It will add the `
### Elsa Studio
Elsa Studio is an **independent** web application that allows you to design, manage, and execute workflows. It is built using **Blazor Server/WebAssembly**.
[Elsa Studio](https://docs.elsaworkflows.io/application-types/elsa-studio) is a **standalone** web application that allows you to design, manage, and execute workflows. It is built using **Blazor Server/WebAssembly**.
`ElsaDemoApp.Studio.WASM` is a sample Blazor WebAssembly project that demonstrates how to use Elsa Studio with ELSA Server with ABP Framework.
> Elsa Studio has its own layout and theme, and you can't integrate it into an ABP Blazor project for now.
![Elsa Studio](../images/elsa-studio-wasm.png)
Please check the [Elsa Workflows - Sample Workflow Demo](../samples/elsa-workflows-demo.md) document to download its source code for review.
#### Elsa Studio Authentication
Elsa Studio requires authentication and there are two ways to authenticate Elsa Studio:
* Password Flow Authentication
* Code Flow Authentication
#### Elsa Studio - Password Flow Authentication
##### Elsa Studio - Password Flow Authentication
The `AbpElsaIdentityModule(Volo.Elsa.Abp.Identity)` module is used to integrate with [ABP Identity module](./identity-pro.md) to check Elsa Studio *username* and *password* against ABP Identity.
@ -109,7 +186,7 @@ Once, you logged in to the application, you can start defining workflows, manage
![elsa-main](../images/elsa-main-page.png)
#### Elsa Studio - Code Flow Authentication
##### Elsa Studio - Code Flow Authentication
ABP applications use [OpenIddict](./openiddict-pro.md) for authentication. So, you can use the [Authorization Code Flow](https://oauth.net/2/grant-types/authorization-code/) to authenticate Elsa Studio.

6
docs/en/modules/file-management.md

@ -144,6 +144,12 @@ You can move files by clicking `Actions -> Move` on the table.
You can rename a file by clicking `Actions -> Rename` on the table.
###### File Sharing
To share a file, click `Actions -> Share` in the table. Once sharing is enabled, you can copy the shared link directly from the table.
> Anyone with the shared link will be able to access the file while sharing is enabled.
## Data Seed
This module doesn't seed any data.

3
docs/en/modules/identity-pro.md

@ -434,9 +434,10 @@ This module doesn't define any additional distributed event. See the [standard d
## See Also
* [Import External Users](./identity/import-external-users.md)
* [LDAP Login](./identity/idap.md)
* [LDAP Login](./identity/ldap.md)
* [OAuth Login](./identity/oauth-login.md)
* [Periodic Password Change (Password Aging)](./identity/periodic-password-change.md)
* [Two Factor Authentication](./identity/two-factor-authentication.md)
* [Session Management](./identity/session-management.md)
* [Password History](./identity/password-history.md)

0
docs/en/modules/identity/idap.md → docs/en/modules/identity/ldap.md

20
docs/en/release-info/migration-guides/abp-10-0.md

@ -15,6 +15,24 @@ This document is a guide for upgrading ABP v9.x solutions to ABP v10.0. There ar
We've upgraded ABP to .NET 10.0, so you need to move your solutions to .NET 10.0 if you want to use ABP 10.0. You can check Microsoft’s [Migrate from ASP.NET Core 9.0 to 10.0](https://learn.microsoft.com/en-us/aspnet/core/migration/90-to-100) documentation to see how to update an existing ASP.NET Core 9.0 project to ASP.NET Core 10.0.
### MySQL Support for .NET 10.0
**If you are using MySQL as your database provider, please be aware of the following compatibility issues before upgrading to ABP 10.0!**
The MySQL Entity Framework Core providers currently have limited support for .NET 10.0:
* **Pomelo.EntityFrameworkCore.MySql**: Does not yet support .NET 10.0. The team is actively working on adding support.
* **MySql.EntityFrameworkCore**: Currently in Release Candidate (RC) status with known bugs that may affect production applications.
**Recommendation**: If you are using MySQL, we recommend waiting to upgrade to ABP 10.0 until the MySQL providers release stable versions with full .NET 10.0 support.
**Track Progress**:
* [Pomelo Provider - EF Core 10 Support](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/2007)
* [MySql.EntityFrameworkCore NuGet Package](https://www.nuget.org/packages/MySql.EntityFrameworkCore/#versions-body-tab)
We will update to support the latest stable MySQL providers as soon as they become available.
### Add New EF Core Migrations
Some entities in certain modules have been modified. If you are using Entity Framework Core, please create a new EF Core migration in your project after upgrading to ABP 10.0.
@ -27,6 +45,8 @@ We removed the Razor Runtime Compilation support since it is obsolete and replac
If you want to keep using it, you can add [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation) package to your project and configure it manually.
> If the referenced project also contains Razor Pages that require this feature, add the package to that project as well.
```csharp
using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation;
using Volo.Abp.DependencyInjection;

2
docs/en/release-info/migration-guides/abp-5-0-angular.md

@ -104,7 +104,7 @@ If you don't want to use the NGXS, you should remove all NGXS related imports, i
## @angular/localize package
[`@angular/localize`](https://angular.io/api/localize) dependency has been removed from `@abp/ng.core` package. The package must be installed in your app. Run the following command to install:
[`@angular/localize`](https://angular.dev/guide/i18n/add-package) dependency has been removed from `@abp/ng.core` package. The package must be installed in your app. Run the following command to install:
```bash
npm install @angular/localize@12

4
docs/en/release-info/release-notes.md

@ -14,9 +14,9 @@ Also see the following notes about ABP releases:
* [ABP Studio release notes](../studio/release-notes.md)
* [Change logs for ABP pro packages](https://abp.io/pro-releases)
## 10.0 (2025-10-01)
## 10.0 (2025-11-18)
This is currently a RC (release-candidate) and you can see the detailed **[blog post / announcement](https://abp.io/community/announcements/announcing-abp-10-0-release-candidate-86lrnyox)** for the v10.0 release.
See the detailed **[blog post / announcement](https://abp.io/community/announcements/abp.io-platform-10.0-final-has-been-released-spknn925)** for the v10.0 release.
* Upgraded to .NET 10.0
* Upgraded to `Blazorise` **v1.8.6**

2
docs/en/samples/easy-crm.md

@ -30,7 +30,7 @@ When you download and open the zip file, you will see two folders:
### Server Side / MVC (Razor Pages) Application
* Open the solution (inside the aspnet-core folder) in **Visual Studio 2019** or later (or with another IDE that supports ASP.NET Core).
* Open the solution (inside the aspnet-core folder) in **Visual Studio 2026** or later (or with another IDE that supports ASP.NET Core).
* This project use `Sqlite`, the default database folder is located at appsettings (`"SqliteDbFolder": "sqliteDbs"`, this folder is located in the MVC project).
* Open the `appsettings.json` file in the `Volo.EasyCrm.Web` application and set `"UseDynamicDatabase": "false"`.
> The MVC project is creating new database for each unique visitor. And the visitor id is stored at cookies. When you set `UseDynamicDatabase` as a `true`, you cannot run Blazor & Angular projects because they have no cookie implementation. Be aware it is set as `false` for running Blazor & Angular applications.

2
docs/en/samples/microservice-demo.md

@ -60,7 +60,7 @@ To be able to run the solution from source code, following tools should be insta
### Open & Build the Visual Studio Solution
* Open the `samples\MicroserviceDemo\MicroserviceDemo.sln` in Visual Studio 2017 (15.9.0+).
* Open the `samples\MicroserviceDemo\MicroserviceDemo.sln` in Visual Studio 2026 (18.0.0+).
* Run `dotnet restore` from the command line inside the `samples\MicroserviceDemo` folder.
* Build the solution in Visual Studio.

2
docs/en/solution-templates/layered-web-application/web-applications.md

@ -120,7 +120,7 @@ The required style files are added to the `styles` array in `angular.json`. `App
You should create your tests in the same folder as the file you want to test.
See the [testing document](https://angular.io/guide/testing).
See the [testing document](https://angular.dev/guide/testing).
### Depended Packages

2
docs/en/suite/editing-templates.md

@ -27,7 +27,7 @@ There's a search box on the templates page. To find the related template, pick a
There's a naming convention for the template files.
* If the template name has `Server` prefix, it's used for backend code like repositories, application services, localizations, controllers, permissions, mappings, unit tests.
* If the template name has `Frontend.Angular` prefix, it's used for Angular code generation. The Angular code is being generated via [Angular Schematics](https://angular.io/guide/schematics).
* If the template name has `Frontend.Angular` prefix, it's used for Angular code generation. The Angular code is being generated via [Angular Schematics](https://angular.dev/tools/cli/schematics).
* If the template name has `Frontend.Mvc` prefix, it's used for razor pages, menus, JavaScript, CSS files.
* If the template name has `Frontend.Blazor` prefix, it's used for razor components.

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save