@ -0,0 +1,207 @@ |
|||
# ABP.IO Platform 7.1 RC Has Been Released |
|||
|
|||
Today, we are happy to release the [ABP Framework](https://abp.io/) and [ABP Commercial](https://commercial.abp.io/) version **7.1 RC** (Release Candidate). This blog post introduces the new features and important changes in this new version. |
|||
|
|||
Try this version and provide feedback for a more stable version of ABP v7.1! Thanks to all of you. |
|||
|
|||
## Get Started with the 7.1 RC |
|||
|
|||
Follow the steps below to try version 7.1.0 RC today: |
|||
|
|||
1) **Upgrade** the ABP CLI to version `7.1.0-rc.1` using a command line terminal: |
|||
|
|||
````bash |
|||
dotnet tool update Volo.Abp.Cli -g --version 7.1.0-rc.1 |
|||
```` |
|||
|
|||
**or install** it if you haven't before: |
|||
|
|||
````bash |
|||
dotnet tool install Volo.Abp.Cli -g --version 7.1.0-rc.1 |
|||
```` |
|||
|
|||
2) Create a **new application** with the `--preview` option: |
|||
|
|||
````bash |
|||
abp new BookStore --preview |
|||
```` |
|||
|
|||
See the [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for all the available options. |
|||
|
|||
> You can also use the [Get Started](https://abp.io/get-started) page to generate a CLI command to create a new application. |
|||
|
|||
You can use any IDE that supports .NET 7.x, like [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/). |
|||
|
|||
## Migrating to 7.1 |
|||
|
|||
This version doesn't introduce any breaking changes. However, Entity Framework developers may need to add a new code-first database migration to their projects since we made some improvements to the existing entities of some application modules. |
|||
|
|||
## What's New with ABP Framework 7.1? |
|||
|
|||
In this section, I will introduce some major features released in this version. In addition to these features, so many enhancements have been made in this version too. |
|||
|
|||
Here is a brief list of the titles explained in the next sections: |
|||
|
|||
* Blazor WASM option added to Application Single Layer Startup Template |
|||
* Introducing the `IHasEntityVersion` interface and `EntitySynchronizer` base class |
|||
* Introducing the `DeleteDirectAsync` method for the `IRepository` interface |
|||
* Introducing the `IAbpHostEnvironment` interface |
|||
* Improvements on the eShopOnAbp project |
|||
* Others |
|||
|
|||
### Blazor WASM option added to Application Single Layer Startup Template |
|||
|
|||
We've created the [Application (Single Layer) Startup Template](https://docs.abp.io/en/abp/7.1/Startup-Templates/Application-Single-Layer) in v5.2 with three UI types: Angular, Blazor Server and MVC. At the moment, we didn't provide UI option for Blazor, because it required 3 projects at least (server-side, client-side and shared library between these two projects). |
|||
|
|||
In this version, we've added the Blazor WASM option to the **Application (Single Layer) Startup Template**. It still contains three projects (`blazor`, `host`, and `contracts`) but hosted by a single `host` project. |
|||
|
|||
You can use the following CLI command to create an `app-nolayers` template with the Blazor UI as the UI option: |
|||
|
|||
```bash |
|||
abp new TodoApp -t app-nolayers -u blazor --version 7.1.0-rc.1 |
|||
``` |
|||
|
|||
> You can check the [Quick Start documentation](https://docs.abp.io/en/abp/7.1/Tutorials/Todo/Single-Layer/Index?UI=Blazor&DB=EF) for a quick start with this template. |
|||
|
|||
### Introducing the `IHasEntityVersion` interface and `EntitySynchronizer` base class |
|||
|
|||
Entity synchronization is an important concept, especially in distributed applications and module development. If we have an entity that is related to other modules, we need to align/sync their data once the entity changes and versioning entity changes can also be good, so we can know whether they're synced or not. |
|||
|
|||
In this version, [@gdlcf88](https://github.com/gdlcf88) made a great contribution to the ABP Framework and introduced the `IHasEntityVersion` interface which adds **auto-versioning** to entity classes and `EntitySynchronizer` base class to **automatically sync an entity's properties from a source entity**. |
|||
|
|||
You can check the issue and documentation from the following links for more info: |
|||
|
|||
- [Issue: Entity synchronizers and a new EntityVersion audit property](https://github.com/abpframework/abp/issues/14196) |
|||
- [Versioning Entities](https://docs.abp.io/en/abp/7.1/Entities#versioning-entities) |
|||
- [Distributed Event Bus - Entity Synchronizer](https://docs.abp.io/en/abp/7.1/Distributed-Event-Bus#entity-synchronizer) |
|||
|
|||
> Note: The entities of some modules from the ABP Framework have implemented the `IHasEntityVersion` interface. Therefore, if you are upgrading your application from an earlier version, you need to create a new migration and apply it to your database. |
|||
|
|||
### Introducing the `DeleteDirectAsync` method for the `IRepository` interface |
|||
|
|||
EF 7 introduced a new [`ExecuteDeleteAsync`](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/whatsnew#executeupdate-and-executedelete-bulk-updates) method that deletes entities without involving the change tracker into the process. Therefore, it's much faster. |
|||
|
|||
We've added the `DeleteDirectAsync` method to the `IRepository<>` interface to take the full power of EF 7. It deletes all entities that fit the given predicate. It directly deletes entities from the database, without fetching them. Therefore, some features (like **soft-delete**, **multi-tenancy**, and **audit logging)** won't work, so use this method carefully when you need it. And use the `DeleteAsync` method if you need those features. |
|||
|
|||
### Introducing the `IAbpHostEnvironment` interface |
|||
|
|||
Sometimes, while creating an application, we need to get the current hosting environment and take actions according to that. In such cases, we can use some services such as [IWebHostEnvironment](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hosting.iwebhostenvironment?view=aspnetcore-7.0) or [IWebAssemblyHostEnvironment](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.webassembly.hosting.iwebassemblyhostenvironment) provided by .NET, in the final application. |
|||
|
|||
However, we can not use these services in a class library, which is used by the final application. ABP Framework provides the `IAbpHostEnvironment` service, which allows you to get the current environment name whenever you want. `IAbpHostEnvironment` is used by the ABP Framework in several places to perform specific actions by the environment. For example, ABP Framework reduces the cache duration on the **Development** environment for some services. |
|||
|
|||
**Usage:** |
|||
|
|||
```csharp |
|||
public class MyService |
|||
{ |
|||
private readonly IAbpHostEnvironment _abpHostEnvironment; |
|||
|
|||
public MyService(IAbpHostEnvironment abpHostEnvironment) |
|||
{ |
|||
_abpHostEnvironment = abpHostEnvironment; |
|||
} |
|||
|
|||
public void MyMethod() |
|||
{ |
|||
//getting the current environment name |
|||
var environmentName = _abpHostEnvironment.EnvironmentName; |
|||
|
|||
//check for the current environment |
|||
if (_abpHostEnvironment.IsDevelopment()) { /* ... */ } |
|||
} |
|||
} |
|||
``` |
|||
|
|||
You can inject the `IAbpHostEnvironment` into your service and get the current environment by using its `EnvironmentName` property. You can also check the current environment by using its extension methods such as `IsDevelopment()`. |
|||
|
|||
> Check the [ABP Application Startup](https://docs.abp.io/en/abp/7.1/Application-Startup) documentation for more information. |
|||
|
|||
### Improvements on the eShopOnAbp project |
|||
|
|||
K8s and Docker configurations have been made within this version (Dockerfiles and helm-charts have been added and image build scripts have been updated). See [#14083](https://github.com/abpframework/abp/issues/14083) for more information. |
|||
|
|||
### Others |
|||
|
|||
* Referral Links have been added to the CMS Kit Comment Feature (optional). You can specify common referral links (such as "nofollow" and "noreferrer") for links in the comments. See [#15458](https://github.com/abpframework/abp/issues/15458) for more information. |
|||
* ReCaptcha verification has been added to the CMS Kit Comment Feature (optional). You can enable ReCaptcha support to enable protection against bots. See the [documentation](https://docs.abp.io/en/abp/7.1/Modules/Cms-Kit/Comments) for more information. |
|||
* In the development environment, it is a must to reduce cache durations for some points. We typically don't have to invalidate the cache manually or wait on it for a certain time to be invalidated. For that purpose, we have reduced the cache durations for some points on the development environment. See [#14842](https://github.com/abpframework/abp/pull/14842) for more information. |
|||
|
|||
## What's New with ABP Commercial 7.1? |
|||
|
|||
We've also worked on [ABP Commercial](https://commercial.abp.io/) to align the new features and changes made in the ABP Framework. The following sections introduce a few new features coming with ABP Commercial 7.1. |
|||
|
|||
### Blazor WASM option added to Application Single Layer Pro Startup Template |
|||
|
|||
The [**Application (Single Layer) Startup Template**](https://docs.abp.io/en/commercial/latest/startup-templates/application-single-layer/index) with Blazor UI is also available for ABP Commercial customers with this version as explained above. |
|||
|
|||
You can use the following CLI command to create an `app-nolayers-pro` template with Blazor UI as the UI option: |
|||
|
|||
```bash |
|||
abp new TodoApp -t app-nolayers-pro -u blazor --version 7.1.0-rc.1 |
|||
``` |
|||
|
|||
You can also create an `app-nolayers-pro` template with Blazor UI via ABP Suite: |
|||
|
|||
 |
|||
|
|||
### Suite - MAUI Blazor Code Generation |
|||
|
|||
We provided a new UI option "MAUI Blazor" for the `app-pro` template in the previous version and it's possible to create a `maui-blazor` application with both ABP CLI and ABP Suite. |
|||
|
|||
You can create an `app-pro` template with the MAUI Blazor as the UI option with the following ABP CLI command: |
|||
|
|||
```bash |
|||
abp new Acme.BookStore -t app-pro -u maui-blazor |
|||
``` |
|||
|
|||
In this version, we implemented the code generation for MAUI Blazor. You can create and generate CRUD pages for this new UI option as you do in other UI types. |
|||
|
|||
> Note: MAUI Blazor is currently only available with the `app-pro` template. |
|||
|
|||
### SaaS Module - Allowing entering a username while impersonating the tenant |
|||
|
|||
In the previous versions, we were able to impersonate a tenant from the [SaaS Module's Tenant Management UI](https://docs.abp.io/en/commercial/7.1/modules/saas#tenant-management). There was a constraint in this approach, which forced us to only impersonate the "admin" user. However, the tenant might change the admin user's username, or we may want to impersonate another user of the tenant. |
|||
|
|||
Thus, with this version, we decided to allow the impersonation of the tenant by the specified username. |
|||
|
|||
*You can click on the "Login with this tenant" action button:* |
|||
|
|||
 |
|||
|
|||
*Then, Specify the admin name of the tenant:* |
|||
|
|||
 |
|||
|
|||
## Community News |
|||
|
|||
### New ABP Community Posts |
|||
|
|||
* [Sergei Gorlovetsky](https://community.abp.io/members/Sergei.Gorlovetsky) has created two new community articles: |
|||
* [Why ABP Framework is one of the best tools for migration from legacy MS Access systems to latest Web app](https://community.abp.io/posts/why-abp-framework-is-one-of-the-best-tools-for-migration-from-legacy-ms-access-systems-to-latest-web-app-7l39eof0) |
|||
* [ABP Framework — 5 steps Go No Go Decision Tree](https://community.abp.io/posts/abp-framework-5-steps-go-no-go-decision-tree-2sy6r2st) |
|||
* [Onur Pıçakcı](https://github.com/onurpicakci) has created his first ABP community article that explains how to contribute to ABP Framework. You can read it 👉 [here](https://community.abp.io/posts/how-to-contribute-to-abp-framework-46dvzzvj). |
|||
* [Maliming](https://github.com/maliming) has created a new community article to show how to convert create/edit modals to a page. You can read it 👉 [here](https://community.abp.io/posts/converting-createedit-modal-to-page-4ps5v60m). |
|||
|
|||
We thank you all. We thank all the authors for contributing to the [ABP Community platform](https://community.abp.io/). |
|||
|
|||
### Volosoft Attended NDC London 2023 |
|||
|
|||
 |
|||
|
|||
Core team members of the ABP Framework, [Halil Ibrahim Kalkan](https://twitter.com/hibrahimkalkan) and [Alper Ebicoglu](https://twitter.com/alperebicoglu) attended [NDC London 2023](https://ndclondon.com/) from the 23rd to the 27th of January. |
|||
|
|||
### Community Talks 2023.1: LeptonX Customization |
|||
|
|||
 |
|||
|
|||
In this episode of ABP Community Talks, 2023.1; we'll talk about **LeptonX Customization**. We will dive into the details and show you how to customize the [LeptonX Theme](https://leptontheme.com/) with examples. |
|||
|
|||
The event will be live on Thursday, February 16, 2023 (20:00 - 21:00 UTC). |
|||
|
|||
> Register to listen and ask your questions now 👉 https://kommunity.com/volosoft/events/abp-community-talks-20231-leptonx-customization-03f9fd8c. |
|||
|
|||
## Conclusion |
|||
|
|||
This version comes with some new features and a lot of enhancements to the existing features. You can see the [Road Map](https://docs.abp.io/en/abp/7.1/Road-Map) documentation to learn about the release schedule and planned features for the next releases. Please try the ABP v7.1 RC and provide feedback to help us release a more stable version. |
|||
|
|||
Thanks for being a part of this community! |
|||
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 80 KiB |
@ -0,0 +1,105 @@ |
|||
# How to Contribute to ABP Framework |
|||
|
|||
## Introduction |
|||
|
|||
In this article I will explain how you can contribute to the open source ABP Framework. You will not only learn about the ABP Framework, but also how to contribute to an open source project, what are the standard rules, some git operations, etc. |
|||
|
|||
## What is Open Source? |
|||
|
|||
Open source software is code designed to be publicly available. Anyone can view, use, modify and distribute the project and code. The fact that the code is open source makes it a natural community and open for improvement. This enables ideas and thoughts to spread rapidly. |
|||
|
|||
## What is ABP Framework? |
|||
|
|||
ABP Framework is a complete infrastructure for building modern web applications following the best practices and guidelines of software development. ABP Framework is completely free, [open source](https://github.com/abpframework) and community driven. ABP is a modular framework and Application Modules provide pre-built application functionalities. |
|||
|
|||
## Before Contribution |
|||
|
|||
Before making any changes and trying to push them to the target repository we need to create a new [issue](https://github.com/abpframework/abp/issues) if there are no issues with the work. If there is an existing issue, you can proceed through this issue. This way, no other developer will work on the same issue and your PR will have a better chance to be accepted. |
|||
|
|||
Previous ABP Community Talk on this topic can be found [here](https://www.youtube.com/watch?v=Wz4Z-O-YoPg). |
|||
|
|||
## GitHub Issues |
|||
You may want to fix a known bug or work on a planned enhancement. See the [issue list](https://github.com/abpframework/abp/issues) on GitHub. |
|||
|
|||
## Feature Requests |
|||
If you have a feature idea for the framework or modules, create an issue on GitHub or attend an existing discussion. Then you can implement it if it's embraced by the community. |
|||
|
|||
## How to Contribute to an Open Source Software? |
|||
There are some steps to contribute to OSS projects. You can follow the steps below. |
|||
|
|||
## Step 1: Fork the Project |
|||
|
|||
The first thing we need to do now is to fork the open source project. Forking will create a copy of the project in your own GitHub account. This will allow users to make changes to the code without affecting the original repository. Just press the fork key in the project. |
|||
|
|||
 |
|||
|
|||
After forking, it will create a new repo in your own GitHub profile. |
|||
|
|||
 |
|||
|
|||
## Step 2: Clone the Project |
|||
|
|||
In order to develop the project, you need to clone it to your local. After clicking on the code button, select your preferred cloning method and copy the link. You can run the copied link on your local machine with the `git clone` command, but we will use GitHub Desktop. Press `Open with GitHub Desktop` and the repo will be installed on your local machine. |
|||
|
|||
or alternatively use the `git clone https://github.com/username/abp.git` command |
|||
|
|||
 |
|||
|
|||
## Step 3: Create a New Branch |
|||
|
|||
In this step, you need to create a new branch of your own before you start developing it. Open the repo on GitHub Desktop and create a new branch. When creating a new branch, be careful which branch you create it on. |
|||
|
|||
or alternatively use the `git checkout -b new-branch` command |
|||
|
|||
 |
|||
|
|||
## Step 4: Development |
|||
|
|||
Choose a suitable IDE to develop on the new branch you created. In order not to complicate things, we will create a `Developers.md` file and process it. Let's enter a sample text in the Developers file. |
|||
|
|||
 |
|||
|
|||
As you can see, all changes made to the repo are reflected directly on GitHub Desktop. |
|||
|
|||
 |
|||
|
|||
## Step 5: Commit |
|||
|
|||
The commit operation is used to save the changes you have made. It is useful to commit after certain operations are done in the project. It is useful to write a short sentence describing what you've done for the changes made in each commit. Press the `Commit to <branch-name>` button to commit. |
|||
|
|||
or alternatively use the `git add .` and `git commit -m "Added the Developer List"` command |
|||
|
|||
 |
|||
|
|||
## Step 6: Publish the Changes |
|||
|
|||
The changes you have made so far are only visible on your local machine. You need to publish these changes to submit them to your forked repository. Please press the publish branch button to publish. |
|||
|
|||
or alternatively use the `git push origin new-branch` command |
|||
|
|||
|
|||
 |
|||
|
|||
## Step 7: Create a Pull Request |
|||
|
|||
After the push, the pull request `Create Pull Request` button will appear on GitHub Desktop. Click it and create a pull request. |
|||
|
|||
 |
|||
|
|||
You can also make a pull request from the repo in your GitHub profile. |
|||
|
|||
 |
|||
|
|||
Before creating the pull request, make sure that the branch you created is making changes to the correct branch. After briefly describing your changes in the title and description, click the `Create pull request` button. This will send a pull request to the original repository. If the pull request is approved and merged by the community, your changes will also appear in the main repository. |
|||
|
|||
 |
|||
|
|||
That's it! You have contributed your development to an open source project. |
|||
|
|||
## Conclusion |
|||
In this article, I showed you how you could contribute to the ABP Framework, an open source and community driven project. Thank you for reading the article, I hope it was useful. See you soon! |
|||
|
|||
## References |
|||
- https://opensource.guide/how-to-contribute/ |
|||
- https://docs.abp.io/en/abp/latest/Contribution/Index |
|||
|
|||
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 666 KiB |
|
After Width: | Height: | Size: 550 KiB |
|
After Width: | Height: | Size: 664 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 37 KiB |
@ -0,0 +1,86 @@ |
|||
# Converting Create/Edit Modal to Page |
|||
|
|||
In this document we will explain how to convert BookStore's `Books` create & edit modals to regular razor pages. |
|||
|
|||
## Before |
|||
 |
|||
|
|||
## Now |
|||
 |
|||
|
|||
## Index page |
|||
|
|||
Repalce `abp-button(NewBookButton)` buttom with `<a class="btn btn-primary" href="/Books/CreateModal"><i class="fa fa-plus"></i> @L["NewBook"].Value</a>`. |
|||
|
|||
## Index js file |
|||
|
|||
Remove the related codes of `createModal` and `editModal`. |
|||
|
|||
Change the `Edit row action` with `location.href = "/Books/EditModal?id=" + data.record.id;` |
|||
|
|||
|
|||
## Create/Edit Book page |
|||
|
|||
Remove `Layout = null;` and add some custom style and javascript code to `CreateModal.cshtml` & `EditModal.cshtml`. |
|||
|
|||
```csharp |
|||
@section styles { |
|||
<style> |
|||
.abp-view-modal .modal { |
|||
position: static; |
|||
display: block; |
|||
opacity: inherit !important; |
|||
} |
|||
.abp-view-modal .modal.fade .modal-dialog { |
|||
transition: inherit !important; |
|||
transform: inherit !important;; |
|||
} |
|||
.abp-view-modal .modal-header .btn-close { |
|||
display: none; |
|||
} |
|||
</style> |
|||
} |
|||
@section scripts { |
|||
<script> |
|||
$(".abp-view-modal form").abpAjaxForm().on('abp-ajax-success', function () { |
|||
location.href = "/Books"; |
|||
}); |
|||
</script> |
|||
} |
|||
``` |
|||
|
|||
Add a `div` element with `abp-view-modal` class to wrap the `abp-dynamic-form`, Set size of `abp-modal` to `ExtraLarge` and remove the `AbpModalButtons.Cancel` button from `abp-modal-footer`. |
|||
|
|||
### CreateModal |
|||
```csharp |
|||
<div class="abp-view-modal"> |
|||
<abp-dynamic-form abp-model="Book" asp-page="/Books/CreateModal"> |
|||
<abp-modal static="true" size="ExtraLarge"> |
|||
<abp-modal-header title="@L["NewBook"].Value"></abp-modal-header> |
|||
<abp-modal-body> |
|||
<abp-form-content /> |
|||
</abp-modal-body> |
|||
<abp-modal-footer buttons="@(AbpModalButtons.Save)"></abp-modal-footer> |
|||
</abp-modal> |
|||
</abp-dynamic-form> |
|||
</div> |
|||
``` |
|||
|
|||
### EditModal |
|||
```csharp |
|||
<div class="abp-view-modal"> |
|||
<abp-dynamic-form abp-model="Book" asp-page="/Books/EditModal"> |
|||
<abp-modal size="ExtraLarge"> |
|||
<abp-modal-header title="@L["Update"].Value"></abp-modal-header> |
|||
<abp-modal-body> |
|||
<abp-form-content /> |
|||
</abp-modal-body> |
|||
<abp-modal-footer buttons="@(AbpModalButtons.Save)"></abp-modal-footer> |
|||
</abp-modal> |
|||
</abp-dynamic-form> |
|||
</div> |
|||
``` |
|||
|
|||
You can check this Git commit for details. |
|||
|
|||
https://github.com/abpframework/abp-samples/commit/f3014e0ec422cb2d8816d0e00dd6ab9cc1adfc21 |
|||
|
After Width: | Height: | Size: 3.9 MiB |
|
After Width: | Height: | Size: 3.9 MiB |
@ -0,0 +1,19 @@ |
|||
# ABP Version 7.1 Migration Guide |
|||
|
|||
This document is a guide for upgrading ABP v7.0 solutions to ABP v7.1. There are a few changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application. |
|||
|
|||
## Navigation Menu - `CustomData` type changed to `Dictionary<string, object>` |
|||
|
|||
`ApplicationMenu` and `ApplicationMenuItem` classes' `CustomData` property type has been changed to `Dictionary<string, object>`. So, if you use the optional `CustomData` property of these classes, change it accordingly. See [#15608](https://github.com/abpframework/abp/pull/15608) for more information. |
|||
|
|||
*Old usage:* |
|||
|
|||
```csharp |
|||
var menu = new ApplicationMenu("Home", L["Home"], "/", customData: new MyCustomData()); |
|||
``` |
|||
|
|||
*New usage:* |
|||
|
|||
```csharp |
|||
var menu = new ApplicationMenu("Home", L["Home"], "/").WithCustomData("CustomDataKey", new MyCustomData()); |
|||
``` |
|||
@ -0,0 +1,575 @@ |
|||
# Database Tables |
|||
|
|||
This documentation describes all database tables and their purposes. You can read this documentation to get general knowledge of the database tables that come from each module. |
|||
|
|||
## [Audit Logging Module](Audit-Logging.md) |
|||
|
|||
### AbpAuditLogs |
|||
|
|||
This table stores information about the audit logs in the application. Each record represents an audit log and tracks the actions performed in the application. |
|||
|
|||
### AbpAuditLogActions |
|||
|
|||
This table stores information about the actions performed in the application, which are logged for auditing purposes. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpAuditLogs](#abpauditlogs) | Id | Links each action to a specific audit log. | |
|||
|
|||
### AbpEntityChanges |
|||
|
|||
This table stores information about entity changes in the application, which are logged for auditing purposes. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpAuditLogs](#abpauditlogs) | Id | Links each entity change to a specific audit log. | |
|||
|
|||
### AbpEntityPropertyChanges |
|||
|
|||
This table stores information about property changes to entities in the application, which are logged for auditing purposes. |
|||
|
|||
## Uses |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpEntityChanges](#abpentitychanges) | Id | Links each property change to a specific entity change. | |
|||
|
|||
## [Background Jobs Module](Background-Jobs.md) |
|||
|
|||
### AbpBackgroundJobs |
|||
|
|||
This table stores information about the background jobs in the application and facilitates their efficient management and tracking. Each entry in the table contains details of a background job, including the job name, arguments, try count, next try time, last try time, abandoned status, and priority. |
|||
|
|||
## [Tenant Management Module](Tenant-Management.md) |
|||
|
|||
### AbpTenants |
|||
|
|||
This table stores information about the tenants. Each record represents a tenant and contains information about the tenant, such as name and other details. |
|||
|
|||
### AbpTenantConnectionStrings |
|||
|
|||
This table stores information about the tenant database connection strings. When you define a connection string for a tenant, a new record will be added to this table. You can query this database to get connection strings by tenants. |
|||
|
|||
## Uses |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpTenants](#abptenants) | Id | The `Id` column in the `AbpTenants` table is used to associate the tenant connection string with the corresponding tenant. | |
|||
|
|||
## Blogging Module |
|||
|
|||
### BlgUsers |
|||
|
|||
This table stores information about the blog users. When a new identity user is created, a new record will be added to this table. |
|||
|
|||
### BlgBlogs |
|||
|
|||
This table serves to store blog information and semantically separates the posts of each blog. |
|||
|
|||
### BlgPosts |
|||
|
|||
This table stores information about the blog posts. You can query this table to get blog posts by blogs. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [BlgBlogs](#blgblogs) | Id | To associate the blog post with the corresponding blog. | |
|||
### BlgComments |
|||
|
|||
This table stores information about the comments made on blog posts. You can query this table to get comments by posts. |
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [BlgPosts](#blgposts) | Id | Links the comment to the corresponding blog post. | |
|||
| [BlgComments](#blgcomments) | Id | Links the comment to the parent comment. | |
|||
|
|||
### BlgTags |
|||
|
|||
This table stores information about the tags. When a new tag is used, a new record will be added to this table. You can query this table to get tags by blogs. |
|||
|
|||
### BlgPostTags |
|||
|
|||
This table is used to associate tags with blog posts in order to categorize and organize the content. You can query this table to get post tags by posts. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [BlgTags](#blgtags) | Id | Links the post tag to the corresponding tag. | |
|||
| [BlgPosts](#blgposts) | Id | Links the post tag to the corresponding blog post. | |
|||
|
|||
## [CMS Kit Module](Cms-Kit/Index.md) |
|||
|
|||
### CmsUsers |
|||
|
|||
This table stores information about the CMS Kit module users. When a new identity user is created, a new record will be added to this table. |
|||
|
|||
### CmsBlogs |
|||
|
|||
This table serves to store blog information and semantically separates the posts of each blog. |
|||
|
|||
### CmsBlogPosts |
|||
|
|||
This table stores information about the blog posts. You can query this table to get blog posts by blogs. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [CmsUsers](#cmsusers) | Id | Links the blog post to the corresponding author. | |
|||
|
|||
### CmsBlogFeatures |
|||
|
|||
This table stores information about the blog features. You can query this table to get blog features by blogs. |
|||
|
|||
### CmsComments |
|||
|
|||
This table is utilized by the [CMS Kit Comment system](Cms-Kit/Comments.md) to store comments made on the blog posts. You can query this table to get comments by posts. |
|||
|
|||
### CmsTags |
|||
|
|||
This table stores information about the tags. When a new tag is used, a new record will be added to this table. You can query this table to get tags by blogs. |
|||
|
|||
### CmsEntityTags |
|||
|
|||
This table is utilized by the [Tag Management system](Cms-Kit/Tags.md) to store tags and their relationship with various entities, thus enabling efficient categorization and organization of content. You can query this table to get entity tags by entities. |
|||
|
|||
### CmsGlobalResources |
|||
|
|||
This table is a database table for the [CMS Kit Global Resources system](Cms-Kit/Global-Resources.md), allowing dynamic addition of global styles and scripts. |
|||
|
|||
### CmsMediaDescriptors |
|||
|
|||
This table is utilized by the CMS kit module to manage media files by using the [BlobStoring](../Blob-Storing.md) module. |
|||
|
|||
### CmsMenuItems |
|||
|
|||
This table is used by the [CMS Kit Menu system](Cms-Kit/Menus.md) to manage and store information about dynamic public menus, including details such as menu item display names, URLs, and hierarchical relationships. |
|||
|
|||
### CmsPages |
|||
|
|||
This table is utilized by the [CMS Kit Page system](Cms-Kit/Pages.md) to store dynamic pages within the application, including information such as page URLs, titles, and content. |
|||
|
|||
### CmsRatings |
|||
|
|||
This table is utilized by the [CMS Kit Rating system](Cms-Kit/Ratings.md) to store ratings made on blog posts. You can query this table to get ratings by posts. |
|||
|
|||
### CmsUserReactions |
|||
|
|||
This table is utilized by the [CMS Kit Reaction system](Cms-Kit/Reactions.md) to store reactions made on blog posts. You can query this table to get reactions by posts. |
|||
|
|||
## [Docs Module](Docs.md) |
|||
|
|||
### DocsProjects |
|||
|
|||
This table stores project information to categorize documents according to different projects. |
|||
|
|||
### DocsDocuments |
|||
|
|||
This table retrieves the document if it's not found in the cache. The documentation is being updated when the content is retrieved from the database. |
|||
|
|||
### DocsDocumentContributors |
|||
|
|||
This table stores information about the contributors of the documents. You can query this table to get document contributors by documents. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [DocsDocuments](#docsdocuments) | Id | Links the document contributor to the corresponding document. | |
|||
|
|||
## [Feature Management Module](Feature-Management.md) |
|||
|
|||
### AbpFeatureGroups |
|||
|
|||
This table stores information about the feature groups in the application. For example, you can group all the features in the [`AbpFeatures`](#abpfeatures) table related to the `Identity` module under the `Identity` group. |
|||
|
|||
### AbpFeatures |
|||
|
|||
This table stores information about the features in the application. You can use the `Name` column to link each feature with its corresponding feature value in the [`AbpFeatureValues`](#abpfeaturevalues) table, so that you can easily manage and organize the features. |
|||
|
|||
### AbpFeatureValues |
|||
|
|||
This table stores the values of the features for different providers. You can use the `Name` column to link each feature value with its corresponding feature in the [`AbpFeatures`](#abpfeatures) table, so that you can easily manage and organize the features. |
|||
|
|||
## [Identity Module](Identity.md) |
|||
|
|||
### AbpUsers |
|||
|
|||
This table stores information about the identity users in the application. |
|||
|
|||
### AbpRoles |
|||
|
|||
This table stores information about the roles in the application. Roles are used to manage and control access to different parts of the application by assigning permissions and claims to roles and then assigning those roles to users. This table is important for managing and organizing the roles in the application, and for defining the access rights of the users. |
|||
|
|||
### AbpClaimTypes |
|||
|
|||
This table stores information about the claim types used in the application. You can use the `Name`, `Regex` columns to filter the claim types by name, and regex pattern respectively, so that you can easily manage and track the claim types in the application. |
|||
|
|||
### AbpLinkUsers |
|||
|
|||
This table is useful for linking multiple user accounts across different tenants or applications to a single user, allowing them to easily switch between their accounts. |
|||
|
|||
### AbpUserClaims |
|||
|
|||
This table can manage user-based access control by allowing to assign claims to users, which describes the access rights of the individual user. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpUsers](#abpusers) | Id | Links the user claim to the corresponding user. | |
|||
|
|||
### AbpUserLogins |
|||
|
|||
This table can store information about the user's external logins such as login with Facebook, Google, etc. and it can also be used to track the login history of users. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpUsers](#abpusers) | Id | Links the user login to the corresponding user. | |
|||
|
|||
### AbpUserRoles |
|||
|
|||
This table can manage user-based access control by allowing to assign roles to users, which describe the access rights of the individual user. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpUsers](#abpusers) | Id | Links the user role to the corresponding user. | |
|||
| [AbpRoles](#abproles) | Id | Links the user role to the corresponding role. | |
|||
|
|||
### AbpUserTokens |
|||
|
|||
This table can store information about user's refresh tokens, access tokens and other tokens used in the application. It can also be used to invalidate or revoke user tokens. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpUsers](#abpusers) | Id | Links the user token to the corresponding user. | |
|||
|
|||
### AbpOrganizationUnits |
|||
|
|||
This table is useful for creating and managing a hierarchical structure of the organization, allowing to group users and assign roles based on the organization structure. You can use the `Code`, `ParentId` columns to filter the organization units by code and parent id respectively, so that you can easily manage and track the organization units in the application. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpOrganizationUnits](#abporganizationunits) | ParentId | Links the organization unit to its parent organization unit. | |
|||
|
|||
### AbpOrganizationUnitRoles |
|||
|
|||
This table is useful for managing role-based access control at the level of organization units, allowing to assign different roles to different parts of the organization structure. You can use the `OrganizationUnitId`, `RoleId` columns to filter the roles by organization unit id and role id respectively, so that you can easily manage and track the roles assigned to organization units in the application. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpOrganizationUnits](#abporganizationunits) | Id | Links the organization unit role to the corresponding organization unit. | |
|||
| [AbpRoles](#abproles) | Id | Links the organization unit role to the corresponding role. | |
|||
|
|||
### AbpUserOrganizationUnits |
|||
|
|||
This table stores information about the organization units assigned to the users in the application. This table can manage user-organization unit relationships, and to group users based on the organization structure. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpUsers](#abpusers) | Id | Links the user organization unit to the corresponding user. | |
|||
| [AbpOrganizationUnits](#abporganizationunits) | Id | Links the user organization unit to the corresponding organization unit. | |
|||
|
|||
### AbpRoleClaims |
|||
|
|||
This table is useful for managing role-based access control by allowing to assign claims to roles, which describes the access rights of the users that belong to that role. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpRoles](#abproles) | Id | Links the role claim to the corresponding role. | |
|||
|
|||
### AbpSecurityLogs |
|||
|
|||
This table logs important operations and changes related to user accounts, allowing users to save the security logs for future reference. |
|||
|
|||
## [Permission Management](Permission-Management.md) |
|||
|
|||
### AbpPermissionGroups |
|||
|
|||
This table is important for managing and organizing the permissions in the application, by grouping them into logical categories. |
|||
|
|||
### AbpPermissions |
|||
|
|||
This table is important for managing and controlling access to different parts of the application and for defining the granular permissions that make up the larger permissions or roles. |
|||
|
|||
### AbpPermissionGrants |
|||
|
|||
The table stores and manage the permissions in the application and to keep track of permissions that are granted, to whom and when. Columns such as `Name`, `ProviderName`, `ProviderKey`, `TenantId` can be used to filter the granted permissions by name, provider name, provider key, and tenant id respectively, so that you can easily manage and track the granted permissions in the application. |
|||
|
|||
## [Setting Management](Setting-Management.md) |
|||
|
|||
### AbpSettings |
|||
|
|||
This table stores key-value pairs of settings for the application, and it allows dynamic configuration of the application without the need for recompilation. |
|||
|
|||
## [OpenIddict](OpenIddict.md) |
|||
|
|||
### OpenIddictApplications |
|||
|
|||
This table can store information about the OpenID Connect applications, including the client id, client secret, redirect URI, and other relevant information. It can also be used to authenticate and authorize clients using OpenID Connect protocol. |
|||
|
|||
### OpenIddictAuthorizations |
|||
|
|||
This table stores the OpenID Connect authorization data in the application. It can also be used to manage and validate the authorization grants issued to clients and users. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [OpenIddictApplications](#openiddictapplications) | Id | Links the authorization to the corresponding application. | |
|||
|
|||
### OpenIddictTokens |
|||
|
|||
This table can store information about the OpenID Connect tokens, including the token payload, expiration, type, and other relevant information. It can also be used to manage and validate the tokens issued to clients and users, such as access tokens and refresh tokens, and to control access to protected resources. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [OpenIddictApplications](#openiddictapplications) | Id | Links the token to the corresponding application. | |
|||
| [OpenIddictAuthorizations](#openiddictauthorizations) | Id | Links the token to the corresponding authorization. | |
|||
|
|||
### OpenIddictScopes |
|||
|
|||
This table can store information about the OpenID Connect scopes, including the name and description of the scope. It can also be used to define the permissions or access rights associated with the scopes, which are then used to control access to protected resources. |
|||
|
|||
## [IdentityServer](IdentityServer.md) |
|||
|
|||
### IdentityServerApiResources |
|||
|
|||
This table can store information about the API resources, including the resource name, display name, description, and other relevant information. It can also be used to define the scopes, claims, and properties associated with the API resources, which are then used to control access to protected resources. |
|||
|
|||
### IdentityServerIdentityResources |
|||
|
|||
This table can store information about the identity resources, including the name, display name, description, and enabled status. |
|||
|
|||
### IdentityServerClients |
|||
|
|||
This table can store information about the clients, including the client id, client name, client URI and other relevant information. It can also be used to define the scopes, claims, and properties associated with the clients, which are then used to control access to protected resources. |
|||
|
|||
### IdentityServerApiScopes |
|||
|
|||
This table can store information about the API scopes, including the scope name, display name, description, and other relevant information. It can also be used to define the claims and properties associated with the API scopes, which are then used to control access to protected resources. |
|||
|
|||
### IdentityServerApiResourceClaims |
|||
|
|||
This table can store information about the claims of an API resource, including the claim type and API resource id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerApiResources](#identityserverapiresources) | Id | Links the claim to the corresponding API resource. | |
|||
|
|||
### IdentityServerIdentityResourceClaims |
|||
|
|||
This table can store information about the claims of an identity resource, including the claim type and identity resource id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerIdentityResources](#identityserveridentityresources) | Id | Links the claim to the corresponding identity resource. | |
|||
|
|||
### IdentityServerClientClaims |
|||
|
|||
This table can store information about the claims of a client, including the claim type, claim value and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the claim to the corresponding client. | |
|||
|
|||
### IdentityServerApiScopeClaims |
|||
|
|||
This table can store information about the claims of an API scope, including the claim type and API scope id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerApiScopes](#identityserverapiscopes) | Id | Links the claim to the corresponding API scope. | |
|||
|
|||
### IdentityServerApiResourceProperties |
|||
|
|||
This table can store information about properties, including the property key and value, and the associated API resource. These properties can store additional metadata or configuration information related to the API resources. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerApiResources](#identityserverapiresources) | Id | Links the property to the corresponding API resource. | |
|||
|
|||
### IdentityServerIdentityResourceProperties |
|||
|
|||
This table can store information about properties, including the property key and value, and the associated identity resource. These properties can store additional metadata or configuration information related to the identity resources. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerIdentityResources](#identityserveridentityresources) | Id | Links the property to the corresponding identity resource. | |
|||
|
|||
### IdentityServerClientProperties |
|||
|
|||
This table can be store information about the properties of a client, including the key, value and client id. These properties can store additional metadata or configuration information related to the clients. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the property to the corresponding client. | |
|||
|
|||
### IdentityServerApiScopeProperties |
|||
|
|||
This table can store information about the properties of an API scope, including the key, value and API scope id. These properties can store additional metadata or configuration information related to the API scopes. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerApiScopes](#identityserverapiscopes) | Id | Links the property to the corresponding API scope. | |
|||
|
|||
### IdentityServerApiResourceScopes |
|||
|
|||
This table can store information about the scopes of an API resource, including the scope name and API resource id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerApiResources](#identityserverapiresources) | Id | Links the scope to the corresponding API resource. | |
|||
|
|||
### IdentityServerClientScopes |
|||
|
|||
This table can store information about the scopes of a client, including the scope and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the scope to the corresponding client. | |
|||
|
|||
### IdentityServerApiResourceSecrets |
|||
|
|||
This table can store information about the secrets of an API resource, including the secret value, expiration date, and API resource id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerApiResources](#identityserverapiresources) | Id | Links the secret to the corresponding API resource. | |
|||
|
|||
### IdentityServerClientSecrets |
|||
|
|||
This table can store information about the secrets of a client, including the secret value, expiration date, and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the secret to the corresponding client. | |
|||
|
|||
### IdentityServerClientCorsOrigins |
|||
|
|||
This table can store information about the CORS origins of a client, including the origin and client id. It can also be used to manage and validate the CORS origins of a client. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the CORS origin to the corresponding client. | |
|||
|
|||
### IdentityServerClientGrantTypes |
|||
|
|||
This table can store information about the grant types of a client, including the grant type and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the grant type to the corresponding client. | |
|||
|
|||
### IdentityServerClientIdPRestrictions |
|||
|
|||
This table can store information about the identity provider restrictions of a client, including the identity provider and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the identity provider restriction to the corresponding client. | |
|||
|
|||
### IdentityServerClientPostLogoutRedirectUris |
|||
|
|||
This table can store information about the post logout redirect URIs of a client, including the post logout redirect URI and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the post logout redirect URI to the corresponding client. | |
|||
|
|||
### IdentityServerClientRedirectUris |
|||
|
|||
This table can store information about the redirect URIs of a client, including the redirect URI and client id. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [IdentityServerClients](#identityserverclients) | Id | Links the redirect URI to the corresponding client. | |
|||
|
|||
### IdentityServerDeviceFlowCodes |
|||
|
|||
This table can store information about the device flow codes, including the user code, device code, subject id, client id, creation time, expiration, data and session id. |
|||
|
|||
### IdentityServerPersistedGrants |
|||
|
|||
This table can store information about the persisted grants, including the key, type, subject id, client id, creation time, expiration, and data. |
|||
|
|||
## Others |
|||
|
|||
### AbpBlobContainers |
|||
|
|||
This table is important for providing a better user experience by allowing the application to support multiple containers and providing BLOB-specific features. |
|||
|
|||
### AbpBlobs |
|||
|
|||
This table stores the binary data of BLOBs (binary large objects) in the application. Each BLOB is related to a container in the [AbpBlobContainers](#abpblobcontainers) table, where the container name, tenant id and other properties of the container can be found. |
|||
|
|||
#### Foreign Keys |
|||
|
|||
| Table | Column | Description | |
|||
| --- | --- | --- | |
|||
| [AbpBlobContainers](#abpblobcontainers) | Id | Links the BLOB to the corresponding container. | |
|||
|
|||
### AbpLocalizationResources |
|||
|
|||
This table stores the localization resources for the application. This table is important for providing a better user experience by allowing the application to support multiple resources and providing localized text and other localization-specific features. |
|||
|
|||
### AbpLocalizationTexts |
|||
|
|||
The table contains the resource name, culture name, and a json encoded value which holds the key-value pair of localization text. It allows for efficient storage and management of localization texts and allows for easy update or addition of new translations for specific resources and cultures. |
|||
@ -0,0 +1,15 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Security; |
|||
|
|||
public delegate void ApplicationConfigurationChangedHandler(); |
|||
|
|||
public class ApplicationConfigurationChangedService : IScopedDependency |
|||
{ |
|||
public event ApplicationConfigurationChangedHandler Changed; |
|||
|
|||
public void NotifyChanged() |
|||
{ |
|||
Changed?.Invoke(); |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
using System; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.DependencyInjection; |
|||
|
|||
public class MultiTenantDbContextType |
|||
{ |
|||
public Type Type { get; } |
|||
|
|||
public MultiTenancySides MultiTenancySide { get; } |
|||
|
|||
public MultiTenantDbContextType(Type type, MultiTenancySides multiTenancySide = MultiTenancySides.Both) |
|||
{ |
|||
Type = type; |
|||
MultiTenancySide = multiTenancySide; |
|||
} |
|||
|
|||
public override bool Equals(object obj) |
|||
{ |
|||
var other = obj as MultiTenantDbContextType; |
|||
|
|||
if (other == null) |
|||
{ |
|||
return false; |
|||
} |
|||
|
|||
return other.Type == Type && other.MultiTenancySide == MultiTenancySide; |
|||
} |
|||
|
|||
public override int GetHashCode() |
|||
{ |
|||
return Type.GetHashCode() ^ MultiTenancySide.GetHashCode(); |
|||
} |
|||
} |
|||
@ -1,14 +1,21 @@ |
|||
using System; |
|||
using System.Linq; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.DependencyInjection; |
|||
|
|||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] |
|||
public class ReplaceDbContextAttribute : Attribute |
|||
{ |
|||
public Type[] ReplacedDbContextTypes { get; } |
|||
public MultiTenantDbContextType[] ReplacedDbContextTypes { get; } |
|||
|
|||
public ReplaceDbContextAttribute(params Type[] replacedDbContextTypes) |
|||
{ |
|||
ReplacedDbContextTypes = replacedDbContextTypes; |
|||
ReplacedDbContextTypes = replacedDbContextTypes.Select(type => new MultiTenantDbContextType(type)).ToArray(); |
|||
} |
|||
|
|||
public ReplaceDbContextAttribute(Type replacedDbContextType, MultiTenancySides side) |
|||
{ |
|||
ReplacedDbContextTypes = new[] {new MultiTenantDbContextType(replacedDbContextType, side)}; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore; |
|||
|
|||
public class EfCoreDbContextTypeProvider : IEfCoreDbContextTypeProvider, ITransientDependency |
|||
{ |
|||
private readonly AbpDbContextOptions _options; |
|||
private readonly ICurrentTenant _currentTenant; |
|||
|
|||
public EfCoreDbContextTypeProvider(IOptions<AbpDbContextOptions> options, ICurrentTenant currentTenant) |
|||
{ |
|||
_currentTenant = currentTenant; |
|||
_options = options.Value; |
|||
} |
|||
|
|||
public virtual Type GetDbContextType(Type dbContextType) |
|||
{ |
|||
return _options.GetReplacedTypeOrSelf(dbContextType, _currentTenant.GetMultiTenancySide()); |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore; |
|||
|
|||
public interface IEfCoreDbContextTypeProvider |
|||
{ |
|||
Type GetDbContextType(Type dbContextType); |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.MongoDB; |
|||
|
|||
public interface IMongoDbContextTypeProvider |
|||
{ |
|||
Type GetDbContextType(Type dbContextType); |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.MongoDB; |
|||
|
|||
public class MongoDbContextTypeProvider : IMongoDbContextTypeProvider, ITransientDependency |
|||
{ |
|||
private readonly AbpMongoDbContextOptions _options; |
|||
private readonly ICurrentTenant _currentTenant; |
|||
|
|||
public MongoDbContextTypeProvider(IOptions<AbpMongoDbContextOptions> options, ICurrentTenant currentTenant) |
|||
{ |
|||
_currentTenant = currentTenant; |
|||
_options = options.Value; |
|||
} |
|||
|
|||
public virtual Type GetDbContextType(Type dbContextType) |
|||
{ |
|||
return _options.GetReplacedTypeOrSelf(dbContextType, _currentTenant.GetMultiTenancySide()); |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
public class FifthDbContext : AbpDbContext<FifthDbContext>, IFifthDbContext |
|||
{ |
|||
public DbSet<FifthDbContextDummyEntity> FifthDbContextDummyEntity { get; set; } |
|||
|
|||
public DbSet<FifthDbContextMultiTenantDummyEntity> FifthDbContextMultiTenantDummyEntity { get; set; } |
|||
|
|||
public FifthDbContext(DbContextOptions<FifthDbContext> options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
public class FifthDbContextDummyEntity : AggregateRoot<Guid> |
|||
{ |
|||
public string Value { get; set; } |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
public interface IFifthDbContextDummyEntityRepository : IBasicRepository<FifthDbContextDummyEntity, Guid> |
|||
{ |
|||
|
|||
} |
|||
|
|||
public class FifthDbContextDummyEntityRepository : |
|||
EfCoreRepository<IFifthDbContext, FifthDbContextDummyEntity, Guid>, |
|||
IFifthDbContextDummyEntityRepository |
|||
{ |
|||
public FifthDbContextDummyEntityRepository(IDbContextProvider<IFifthDbContext> dbContextProvider) |
|||
: base(dbContextProvider) |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
public class FifthDbContextMultiTenantDummyEntity : AggregateRoot<Guid>, IMultiTenant |
|||
{ |
|||
public string Value { get; set; } |
|||
|
|||
public Guid? TenantId { get; set; } |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
public interface IFifthDbContextMultiTenantDummyEntityRepository : IBasicRepository<FifthDbContextMultiTenantDummyEntity, Guid> |
|||
{ |
|||
|
|||
} |
|||
|
|||
public class FifthDbContextMultiTenantDummyEntityRepository : |
|||
EfCoreRepository<IFifthDbContext, FifthDbContextMultiTenantDummyEntity, Guid>, |
|||
IFifthDbContextMultiTenantDummyEntityRepository |
|||
{ |
|||
public FifthDbContextMultiTenantDummyEntityRepository(IDbContextProvider<IFifthDbContext> dbContextProvider) |
|||
: base(dbContextProvider) |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
public interface IFifthDbContext : IEfCoreDbContext |
|||
{ |
|||
DbSet<FifthDbContextDummyEntity> FifthDbContextDummyEntity { get; set; } |
|||
|
|||
DbSet<FifthDbContextMultiTenantDummyEntity> FifthDbContextMultiTenantDummyEntity { get; set; } |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
|
|||
namespace Volo.Abp.TestApp.EntityFrameworkCore; |
|||
|
|||
public class HostTestAppDbContext : AbpDbContext<HostTestAppDbContext>, IFifthDbContext |
|||
{ |
|||
public DbSet<FifthDbContextDummyEntity> FifthDbContextDummyEntity { get; set; } |
|||
public DbSet<FifthDbContextMultiTenantDummyEntity> FifthDbContextMultiTenantDummyEntity { get; set; } |
|||
|
|||
public HostTestAppDbContext(DbContextOptions<HostTestAppDbContext> options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.TestApp.FifthContext; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.TestApp.EntityFrameworkCore; |
|||
|
|||
[ReplaceDbContext(typeof(IFifthDbContext), MultiTenancySides.Tenant)] |
|||
public class TenantTestAppDbContext : AbpDbContext<TenantTestAppDbContext>, IFifthDbContext |
|||
{ |
|||
public DbSet<FifthDbContextDummyEntity> FifthDbContextDummyEntity { get; set; } |
|||
public DbSet<FifthDbContextMultiTenantDummyEntity> FifthDbContextMultiTenantDummyEntity { get; set; } |
|||
|
|||
public TenantTestAppDbContext(DbContextOptions<TenantTestAppDbContext> options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
} |
|||