保存项目
This commit is contained in:
commit
24a08c4632
13
.idea/.gitignore
vendored
Normal file
13
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider 忽略的文件
|
||||||
|
/modules.xml
|
||||||
|
/contentModel.xml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/.idea.csharp-abp-study.iml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
4
.idea/encodings.xml
Normal file
4
.idea/encodings.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||||
|
</project>
|
6
.idea/git_toolbox_blame.xml
Normal file
6
.idea/git_toolbox_blame.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxBlameSettings">
|
||||||
|
<option name="version" value="2" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/indexLayout.xml
Normal file
8
.idea/indexLayout.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
2
Skcks.Study.AbpProject/.editorconfig
Normal file
2
Skcks.Study.AbpProject/.editorconfig
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[*.csproj]
|
||||||
|
indent_size = 2
|
1
Skcks.Study.AbpProject/.gitattributes
vendored
Normal file
1
Skcks.Study.AbpProject/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
**/wwwroot/libs/** linguist-vendored
|
274
Skcks.Study.AbpProject/.gitignore
vendored
Normal file
274
Skcks.Study.AbpProject/.gitignore
vendored
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
|
# Visual Studio 2015 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUNIT
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# DNX
|
||||||
|
project.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_i.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/packages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/packages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/packages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignoreable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
node_modules/
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
**/.idea/
|
||||||
|
*.sln.iml
|
||||||
|
|
||||||
|
# ABP Studio
|
||||||
|
**/.abpstudio/
|
||||||
|
|
||||||
|
# AbpProject
|
||||||
|
src/Skcks.Study.AbpProject.Web/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.Web.Host/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.Web.Public/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.Web.Public.Host/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.AuthServer/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.HttpApi.Host/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.HttpApi.HostWithIds/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.DbMigrator/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.Blazor.Server/Logs/*
|
||||||
|
src/Skcks.Study.AbpProject.Blazor.Server.Tiered/Logs/*
|
||||||
|
|
||||||
|
# Use abp install-libs to restore.
|
||||||
|
**/wwwroot/libs/*
|
||||||
|
|
||||||
|
# IdentityServer temp files
|
||||||
|
tempkey.rsa
|
||||||
|
tempkey.jwk
|
13
Skcks.Study.AbpProject/NuGet.Config
Normal file
13
Skcks.Study.AbpProject/NuGet.Config
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
|
</packageSources>
|
||||||
|
<packageSourceMapping>
|
||||||
|
<packageSource key="nuget.org">
|
||||||
|
<package pattern="*" />
|
||||||
|
<package pattern="Microsoft.*" />
|
||||||
|
<package pattern="Volo.*" />
|
||||||
|
</packageSource>
|
||||||
|
</packageSourceMapping>
|
||||||
|
</configuration>
|
57
Skcks.Study.AbpProject/README.md
Normal file
57
Skcks.Study.AbpProject/README.md
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Skcks.Study.AbpProject
|
||||||
|
|
||||||
|
## About this solution
|
||||||
|
|
||||||
|
This is a layered startup solution based on [Domain Driven Design (DDD)](https://docs.abp.io/en/abp/latest/Domain-Driven-Design) practises. All the fundamental ABP modules are already installed. Check the [Application Startup Template](https://abp.io/docs/latest/startup-templates/application/index) documentation for more info.
|
||||||
|
|
||||||
|
### Pre-requirements
|
||||||
|
|
||||||
|
* [.NET8.0+ SDK](https://dotnet.microsoft.com/download/dotnet)
|
||||||
|
* [Node v18 or 20](https://nodejs.org/en)
|
||||||
|
|
||||||
|
### Configurations
|
||||||
|
|
||||||
|
The solution comes with a default configuration that works out of the box. However, you may consider to change the following configuration before running your solution:
|
||||||
|
|
||||||
|
** Check the `ConnectionStrings` in `appsettings.json` files under the `Skcks.Study.AbpProject.Web` and `Skcks.Study.AbpProject.DbMigrator` projects and change it if you need.
|
||||||
|
**
|
||||||
|
### Before running the application
|
||||||
|
|
||||||
|
* Run `abp install-libs` command on your solution folder to install client-side package dependencies. This step is automatically done when you create a new solution, if you didn't especially disabled it. However, you should run it yourself if you have first cloned this solution from your source control, or added a new client-side package dependency to your solution.
|
||||||
|
* Run `Skcks.Study.AbpProject.DbMigrator` to create the initial database. This step is also automatically done when you create a new solution, if you didn't especially disabled it. This should be done in the first run. It is also needed if a new database migration is added to the solution later.
|
||||||
|
|
||||||
|
#### Generating a Signing Certificate
|
||||||
|
|
||||||
|
In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an `openiddict.pfx` file in your application.
|
||||||
|
|
||||||
|
To generate a signing certificate, you can use the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet dev-certs https -v -ep openiddict.pfx -p a41bb421-ee8b-4e36-9929-de417304951f
|
||||||
|
```
|
||||||
|
|
||||||
|
> `a41bb421-ee8b-4e36-9929-de417304951f` is the password of the certificate, you can change it to any password you want.
|
||||||
|
|
||||||
|
It is recommended to use **two** RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.
|
||||||
|
|
||||||
|
For more information, please refer to: [https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios)
|
||||||
|
|
||||||
|
> Also, see the [Configuring OpenIddict](https://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict#production-environment) documentation for more information.
|
||||||
|
|
||||||
|
### Solution structure
|
||||||
|
|
||||||
|
This is a layered monolith application that consists of the following applications:
|
||||||
|
|
||||||
|
* `Skcks.Study.AbpProject.DbMigrator`: A console application which applies the migrations and also seeds the initial data. It is useful on development as well as on production environment.
|
||||||
|
** `Skcks.Study.AbpProject.Web`: ASP.NET Core MVC / Razor Pages application that is the essential web application of the solution.
|
||||||
|
|
||||||
|
## Deploying the application
|
||||||
|
|
||||||
|
Deploying an ABP application is not different than deploying any .NET or ASP.NET Core application. However, there are some topics that you should care about when you are deploying your applications. You can check ABP's [Deployment documentation](https://docs.abp.io/en/abp/latest/Deployment/Index) and ABP Commercial's [Deployment documentation](https://abp.io/docs/latest/startup-templates/application/deployment?UI=MVC&DB=EF&Tiered=No) before deploying your application.
|
||||||
|
|
||||||
|
### Additional resources
|
||||||
|
|
||||||
|
You can see the following resources to learn more about your solution and the ABP Framework:
|
||||||
|
|
||||||
|
* [Web Application Development Tutorial](https://abp.io/docs/latest/tutorials/book-store/part-1)
|
||||||
|
* [Application Startup Template](https://abp.io/docs/latest/startup-templates/application/index)
|
105
Skcks.Study.AbpProject/Skcks.Study.AbpProject.abpmdl
Normal file
105
Skcks.Study.AbpProject/Skcks.Study.AbpProject.abpmdl
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
{
|
||||||
|
"template": "app",
|
||||||
|
"imports": {
|
||||||
|
"Volo.Abp.BasicTheme": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.Account": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.OpenIddict": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.Identity": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.TenantManagement": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.SettingManagement": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.PermissionManagement": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
},
|
||||||
|
"Volo.Abp.FeatureManagement": {
|
||||||
|
"version": "8.3.3",
|
||||||
|
"isInstalled": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"folders": {
|
||||||
|
"items": {
|
||||||
|
"src": {},
|
||||||
|
"test": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"packages": {
|
||||||
|
"Skcks.Study.AbpProject.Application": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.Application/Skcks.Study.AbpProject.Application.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Application.Tests": {
|
||||||
|
"path": "test/Skcks.Study.AbpProject.Application.Tests/Skcks.Study.AbpProject.Application.Tests.abppkg",
|
||||||
|
"folder": "test"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Domain.Shared": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.Domain.Shared/Skcks.Study.AbpProject.Domain.Shared.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Application.Contracts": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.Application.Contracts/Skcks.Study.AbpProject.Application.Contracts.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.HttpApi": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.HttpApi/Skcks.Study.AbpProject.HttpApi.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.HttpApi.Client": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.HttpApi.Client/Skcks.Study.AbpProject.HttpApi.Client.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Web": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.Web/Skcks.Study.AbpProject.Web.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Web.Tests": {
|
||||||
|
"path": "test/Skcks.Study.AbpProject.Web.Tests/Skcks.Study.AbpProject.Web.Tests.abppkg",
|
||||||
|
"folder": "test"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.EntityFrameworkCore.Tests": {
|
||||||
|
"path": "test/Skcks.Study.AbpProject.EntityFrameworkCore.Tests/Skcks.Study.AbpProject.EntityFrameworkCore.Tests.abppkg",
|
||||||
|
"folder": "test"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.EntityFrameworkCore": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.EntityFrameworkCore/Skcks.Study.AbpProject.EntityFrameworkCore.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.TestBase": {
|
||||||
|
"path": "test/Skcks.Study.AbpProject.TestBase/Skcks.Study.AbpProject.TestBase.abppkg",
|
||||||
|
"folder": "test"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Domain.Tests": {
|
||||||
|
"path": "test/Skcks.Study.AbpProject.Domain.Tests/Skcks.Study.AbpProject.Domain.Tests.abppkg",
|
||||||
|
"folder": "test"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.HttpApi.Client.ConsoleTestApp": {
|
||||||
|
"path": "test/Skcks.Study.AbpProject.HttpApi.Client.ConsoleTestApp/Skcks.Study.AbpProject.HttpApi.Client.ConsoleTestApp.abppkg",
|
||||||
|
"folder": "test"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.DbMigrator": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.DbMigrator/Skcks.Study.AbpProject.DbMigrator.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
},
|
||||||
|
"Skcks.Study.AbpProject.Domain": {
|
||||||
|
"path": "src/Skcks.Study.AbpProject.Domain/Skcks.Study.AbpProject.Domain.abppkg",
|
||||||
|
"folder": "src"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
Skcks.Study.AbpProject/Skcks.Study.AbpProject.abpsln
Normal file
40
Skcks.Study.AbpProject/Skcks.Study.AbpProject.abpsln
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"id": "bb4ad528-d64c-4202-bfb5-87fe3b351ae9",
|
||||||
|
"template": "app",
|
||||||
|
"versions": {
|
||||||
|
"AbpFramework": "8.3.3",
|
||||||
|
"AbpStudio": "0.9.6",
|
||||||
|
"TargetDotnetFramework": "net8.0"
|
||||||
|
},
|
||||||
|
"modules": {
|
||||||
|
"Skcks.Study.AbpProject": {
|
||||||
|
"path": "Skcks.Study.AbpProject.abpmdl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runProfiles": {
|
||||||
|
"Default": {
|
||||||
|
"path": "etc/abp-studio/run-profiles/Default.abprun.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"httpRequests": {
|
||||||
|
"ignoredUrls": [
|
||||||
|
"^/metrics$"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"creatingStudioConfiguration": {
|
||||||
|
"template": "app",
|
||||||
|
"createdAbpStudioVersion": "0.9.6",
|
||||||
|
"tiered": "false",
|
||||||
|
"uiFramework": "mvc",
|
||||||
|
"databaseProvider": "ef",
|
||||||
|
"databaseManagementSystem": "sqlserver",
|
||||||
|
"separateTenantSchema": "false",
|
||||||
|
"theme": "basic",
|
||||||
|
"themeStyle": "",
|
||||||
|
"mobileFramework": "none",
|
||||||
|
"publicWebsite": "false",
|
||||||
|
"socialLogin": ""
|
||||||
|
}
|
||||||
|
}
|
130
Skcks.Study.AbpProject/Skcks.Study.AbpProject.sln
Normal file
130
Skcks.Study.AbpProject/Skcks.Study.AbpProject.sln
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.3.32611.2
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Domain", "src\Skcks.Study.AbpProject.Domain\Skcks.Study.AbpProject.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Application", "src\Skcks.Study.AbpProject.Application\Skcks.Study.AbpProject.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.EntityFrameworkCore", "src\Skcks.Study.AbpProject.EntityFrameworkCore\Skcks.Study.AbpProject.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Web", "src\Skcks.Study.AbpProject.Web\Skcks.Study.AbpProject.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Application.Tests", "test\Skcks.Study.AbpProject.Application.Tests\Skcks.Study.AbpProject.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Web.Tests", "test\Skcks.Study.AbpProject.Web.Tests\Skcks.Study.AbpProject.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Domain.Shared", "src\Skcks.Study.AbpProject.Domain.Shared\Skcks.Study.AbpProject.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Application.Contracts", "src\Skcks.Study.AbpProject.Application.Contracts\Skcks.Study.AbpProject.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.HttpApi", "src\Skcks.Study.AbpProject.HttpApi\Skcks.Study.AbpProject.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.HttpApi.Client", "src\Skcks.Study.AbpProject.HttpApi.Client\Skcks.Study.AbpProject.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.EntityFrameworkCore.Tests", "test\Skcks.Study.AbpProject.EntityFrameworkCore.Tests\Skcks.Study.AbpProject.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.TestBase", "test\Skcks.Study.AbpProject.TestBase\Skcks.Study.AbpProject.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.Domain.Tests", "test\Skcks.Study.AbpProject.Domain.Tests\Skcks.Study.AbpProject.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.HttpApi.Client.ConsoleTestApp", "test\Skcks.Study.AbpProject.HttpApi.Client.ConsoleTestApp\Skcks.Study.AbpProject.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skcks.Study.AbpProject.DbMigrator", "src\Skcks.Study.AbpProject.DbMigrator\Skcks.Study.AbpProject.DbMigrator.csproj", "{70680696-BB1E-4383-BCB2-42C3767171FB}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{70680696-BB1E-4383-BCB2-42C3767171FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{70680696-BB1E-4383-BCB2-42C3767171FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{70680696-BB1E-4383-BCB2-42C3767171FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{70680696-BB1E-4383-BCB2-42C3767171FB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||||
|
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||||
|
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||||
|
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||||
|
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||||
|
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||||
|
{70680696-BB1E-4383-BCB2-42C3767171FB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@ -0,0 +1,23 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
|
||||||
|
</wpf:ResourceDictionary>
|
19
Skcks.Study.AbpProject/common.props
Normal file
19
Skcks.Study.AbpProject/common.props
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
|
<AbpProjectType>app</AbpProjectType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);0436</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"applications": {
|
||||||
|
"Skcks.Study.AbpProject.Web": {
|
||||||
|
"type": "dotnet-project",
|
||||||
|
"launchUrl": "https://localhost:44364",
|
||||||
|
"path": "../../../src/Skcks.Study.AbpProject.Web/Skcks.Study.AbpProject.Web.csproj",
|
||||||
|
"kubernetesService": ".*-web$",
|
||||||
|
"execution": {
|
||||||
|
"order": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
using Volo.Abp.Account;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.PermissionManagement;
|
||||||
|
using Volo.Abp.SettingManagement;
|
||||||
|
using Volo.Abp.FeatureManagement;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpProjectDomainSharedModule),
|
||||||
|
typeof(AbpFeatureManagementApplicationContractsModule),
|
||||||
|
typeof(AbpSettingManagementApplicationContractsModule),
|
||||||
|
typeof(AbpIdentityApplicationContractsModule),
|
||||||
|
typeof(AbpAccountApplicationContractsModule),
|
||||||
|
typeof(AbpTenantManagementApplicationContractsModule),
|
||||||
|
typeof(AbpPermissionManagementApplicationContractsModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectApplicationContractsModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
AbpProjectDtoExtensions.Configure();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.ObjectExtending;
|
||||||
|
using Volo.Abp.Threading;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
public static class AbpProjectDtoExtensions
|
||||||
|
{
|
||||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
||||||
|
|
||||||
|
public static void Configure()
|
||||||
|
{
|
||||||
|
OneTimeRunner.Run(() =>
|
||||||
|
{
|
||||||
|
/* You can add extension properties to DTOs
|
||||||
|
* defined in the depended modules.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
*
|
||||||
|
* ObjectExtensionManager.Instance
|
||||||
|
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title");
|
||||||
|
*
|
||||||
|
* See the documentation for more:
|
||||||
|
* https://docs.abp.io/en/abp/latest/Object-Extensions
|
||||||
|
*/
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Categories;
|
||||||
|
|
||||||
|
public class CategoryLookupDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
using Skcks.Study.AbpProject.Localization;
|
||||||
|
using Volo.Abp.Authorization.Permissions;
|
||||||
|
using Volo.Abp.Localization;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Permissions;
|
||||||
|
|
||||||
|
public class AbpProjectPermissionDefinitionProvider : PermissionDefinitionProvider
|
||||||
|
{
|
||||||
|
public override void Define(IPermissionDefinitionContext context)
|
||||||
|
{
|
||||||
|
var myGroup = context.AddGroup(AbpProjectPermissions.GroupName);
|
||||||
|
|
||||||
|
//Define your own permissions here. Example:
|
||||||
|
//myGroup.AddPermission(AbpProjectPermissions.MyPermission1, L("Permission:MyPermission1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static LocalizableString L(string name)
|
||||||
|
{
|
||||||
|
return LocalizableString.Create<AbpProjectResource>(name);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
namespace Skcks.Study.AbpProject.Permissions;
|
||||||
|
|
||||||
|
public static class AbpProjectPermissions
|
||||||
|
{
|
||||||
|
public const string GroupName = "AbpProject";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Add your own permission names. Example:
|
||||||
|
//public const string MyPermission1 = GroupName + ".MyPermission1";
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public class CreateUpdateProductDto
|
||||||
|
{
|
||||||
|
public Guid CategoryId { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
[StringLength(ProductConsts.MaxNameLength)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public float Price { get; set; }
|
||||||
|
public bool IsFreeCargo { get; set; }
|
||||||
|
public DateTime ReleaseDate { get; set; }
|
||||||
|
public ProductStockState StockState { get; set; }
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Skcks.Study.AbpProject.Categories;
|
||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
using Volo.Abp.Application.Services;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public interface IProductAppService: IApplicationService
|
||||||
|
{
|
||||||
|
Task<PagedResultDto<ProductDto>> GetListAsync(PagedAndSortedResultRequestDto input);
|
||||||
|
Task CreateAsync(CreateUpdateProductDto input);
|
||||||
|
Task<ListResultDto<CategoryLookupDto>> GetCategoriesAsync();
|
||||||
|
|
||||||
|
Task<ProductDto> GetAsync(Guid id);
|
||||||
|
Task UpdateAsync(Guid id, CreateUpdateProductDto inputDto);
|
||||||
|
Task DeleteAsync(Guid id);
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public class ProductDto : AuditedEntityDto<Guid>
|
||||||
|
{
|
||||||
|
public Guid CategoryId { get; set; }
|
||||||
|
public string CategoryName { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public float Price { get; set; }
|
||||||
|
public bool IsFreeCargo { get; set; }
|
||||||
|
public DateTime ReleaseDate { get; set; }
|
||||||
|
public ProductStockState StockState { get; set; }
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"role": "lib.application-contracts"
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Skcks.Study.AbpProject</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Domain.Shared\Skcks.Study.AbpProject.Domain.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,14 @@
|
|||||||
|
using Skcks.Study.AbpProject.Localization;
|
||||||
|
using Volo.Abp.Application.Services;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
/* Inherit your application services from this class.
|
||||||
|
*/
|
||||||
|
public abstract class AbpProjectAppService : ApplicationService
|
||||||
|
{
|
||||||
|
protected AbpProjectAppService()
|
||||||
|
{
|
||||||
|
LocalizationResource = typeof(AbpProjectResource);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using Skcks.Study.AbpProject.Categories;
|
||||||
|
using Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
public class AbpProjectApplicationAutoMapperProfile : Profile
|
||||||
|
{
|
||||||
|
public AbpProjectApplicationAutoMapperProfile()
|
||||||
|
{
|
||||||
|
/* You can configure your AutoMapper mapping configuration here.
|
||||||
|
* Alternatively, you can split your mapping configurations
|
||||||
|
* into multiple profile classes for a better organization. */
|
||||||
|
|
||||||
|
CreateMap<Product, ProductDto>();
|
||||||
|
CreateMap<CreateUpdateProductDto, Product>();
|
||||||
|
CreateMap<Category, CategoryLookupDto>();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Skcks.Study.AbpProject.Products;
|
||||||
|
using Volo.Abp.PermissionManagement;
|
||||||
|
using Volo.Abp.SettingManagement;
|
||||||
|
using Volo.Abp.Account;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.AutoMapper;
|
||||||
|
using Volo.Abp.FeatureManagement;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpProjectDomainModule),
|
||||||
|
typeof(AbpProjectApplicationContractsModule),
|
||||||
|
typeof(AbpPermissionManagementApplicationModule),
|
||||||
|
typeof(AbpFeatureManagementApplicationModule),
|
||||||
|
typeof(AbpIdentityApplicationModule),
|
||||||
|
typeof(AbpAccountApplicationModule),
|
||||||
|
typeof(AbpTenantManagementApplicationModule),
|
||||||
|
typeof(AbpSettingManagementApplicationModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectApplicationModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
Configure<AbpAutoMapperOptions>(options =>
|
||||||
|
{
|
||||||
|
options.AddMaps<AbpProjectApplicationModule>();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Skcks.Study.AbpProject.Categories;
|
||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
using Volo.Abp.Uow;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public class ProductAppService:AbpProjectAppService, IProductAppService
|
||||||
|
{
|
||||||
|
private readonly IRepository<Product, Guid> _productRepository;
|
||||||
|
private readonly IRepository<Category, Guid> _categoryRepository;
|
||||||
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
||||||
|
|
||||||
|
public ProductAppService(IRepository<Product, Guid> productRepository, IRepository<Category, Guid> categoryRepository, IUnitOfWorkManager unitOfWorkManager)
|
||||||
|
{
|
||||||
|
_productRepository = productRepository;
|
||||||
|
_categoryRepository = categoryRepository;
|
||||||
|
_unitOfWorkManager = unitOfWorkManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PagedResultDto<ProductDto>> GetListAsync(PagedAndSortedResultRequestDto input)
|
||||||
|
{
|
||||||
|
var productsQuery = await _productRepository.WithDetailsAsync(x=>x.Category);
|
||||||
|
|
||||||
|
productsQuery = productsQuery.Skip(input.SkipCount)
|
||||||
|
.Take(input.MaxResultCount)
|
||||||
|
.OrderBy(x => input.Sorting ?? x.Name);
|
||||||
|
|
||||||
|
|
||||||
|
var products = await AsyncExecuter.ToListAsync(productsQuery);
|
||||||
|
var count = await _productRepository.GetCountAsync();
|
||||||
|
|
||||||
|
return new PagedResultDto<ProductDto>(
|
||||||
|
count, ObjectMapper.Map<List<Product>, List<ProductDto>>(products));
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task CreateAsync(CreateUpdateProductDto input)
|
||||||
|
{
|
||||||
|
var product = ObjectMapper.Map<CreateUpdateProductDto, Product>(input);
|
||||||
|
await _productRepository.InsertAsync(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<ListResultDto<CategoryLookupDto>> GetCategoriesAsync()
|
||||||
|
{
|
||||||
|
var categories = await _categoryRepository.GetListAsync();
|
||||||
|
var categoryLookupDto = ObjectMapper.Map<List<Category>, List<CategoryLookupDto>>(categories);
|
||||||
|
|
||||||
|
return new ListResultDto<CategoryLookupDto>(categoryLookupDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<ProductDto> GetAsync(Guid id)
|
||||||
|
{
|
||||||
|
var product = await _productRepository.GetAsync(id);
|
||||||
|
return ObjectMapper.Map<Product, ProductDto>(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateAsync(Guid id, CreateUpdateProductDto input)
|
||||||
|
{
|
||||||
|
var product = await _productRepository.GetAsync(id);
|
||||||
|
ObjectMapper.Map(input, product);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task DeleteAsync(Guid id)
|
||||||
|
{
|
||||||
|
await _productRepository.DeleteAsync(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
[assembly:InternalsVisibleToAttribute("Skcks.Study.AbpProject.Application.Tests")]
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"role": "lib.application"
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Skcks.Study.AbpProject</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Domain\Skcks.Study.AbpProject.Domain.csproj" />
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Application.Contracts\Skcks.Study.AbpProject.Application.Contracts.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Account.Application" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Identity.Application" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,14 @@
|
|||||||
|
using Skcks.Study.AbpProject.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.Autofac;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.DbMigrator;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpAutofacModule),
|
||||||
|
typeof(AbpProjectEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpProjectApplicationContractsModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectDbMigratorModule : AbpModule
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Skcks.Study.AbpProject.Data;
|
||||||
|
using Serilog;
|
||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.Data;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.DbMigrator;
|
||||||
|
|
||||||
|
public class DbMigratorHostedService : IHostedService
|
||||||
|
{
|
||||||
|
private readonly IHostApplicationLifetime _hostApplicationLifetime;
|
||||||
|
private readonly IConfiguration _configuration;
|
||||||
|
|
||||||
|
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
_hostApplicationLifetime = hostApplicationLifetime;
|
||||||
|
_configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task StartAsync(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
using (var application = await AbpApplicationFactory.CreateAsync<AbpProjectDbMigratorModule>(options =>
|
||||||
|
{
|
||||||
|
options.Services.ReplaceConfiguration(_configuration);
|
||||||
|
options.UseAutofac();
|
||||||
|
options.Services.AddLogging(c => c.AddSerilog());
|
||||||
|
options.AddDataMigrationEnvironment();
|
||||||
|
}))
|
||||||
|
{
|
||||||
|
await application.InitializeAsync();
|
||||||
|
|
||||||
|
await application
|
||||||
|
.ServiceProvider
|
||||||
|
.GetRequiredService<AbpProjectDbMigrationService>()
|
||||||
|
.MigrateAsync();
|
||||||
|
|
||||||
|
await application.ShutdownAsync();
|
||||||
|
|
||||||
|
_hostApplicationLifetime.StopApplication();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||||
|
COPY bin/Release/net8.0/publish/ app/
|
||||||
|
WORKDIR /app
|
||||||
|
ENV ASPNETCORE_URLS=http://+:80
|
||||||
|
ENTRYPOINT ["dotnet", "Skcks.Study.AbpProject.DbMigrator.dll"]
|
@ -0,0 +1,39 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Serilog;
|
||||||
|
using Serilog.Events;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.DbMigrator;
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static async Task Main(string[] args)
|
||||||
|
{
|
||||||
|
Log.Logger = new LoggerConfiguration()
|
||||||
|
.MinimumLevel.Information()
|
||||||
|
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
||||||
|
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
|
||||||
|
#if DEBUG
|
||||||
|
.MinimumLevel.Override("Skcks.Study.AbpProject", LogEventLevel.Debug)
|
||||||
|
#else
|
||||||
|
.MinimumLevel.Override("Skcks.Study.AbpProject", LogEventLevel.Information)
|
||||||
|
#endif
|
||||||
|
.Enrich.FromLogContext()
|
||||||
|
.WriteTo.Async(c => c.File("Logs/logs.txt"))
|
||||||
|
.WriteTo.Async(c => c.Console())
|
||||||
|
.CreateLogger();
|
||||||
|
|
||||||
|
await CreateHostBuilder(args).RunConsoleAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||||
|
Host.CreateDefaultBuilder(args)
|
||||||
|
.AddAppSettingsSecretsJson()
|
||||||
|
.ConfigureLogging((context, logging) => logging.ClearProviders())
|
||||||
|
.ConfigureServices((hostContext, services) =>
|
||||||
|
{
|
||||||
|
services.AddHostedService<DbMigratorHostedService>();
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
{}
|
@ -0,0 +1,46 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Autofac" Version="8.3.3" />
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.EntityFrameworkCore\Skcks.Study.AbpProject.EntityFrameworkCore.csproj" />
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Application.Contracts\Skcks.Study.AbpProject.Application.Contracts.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Logs\**" />
|
||||||
|
<Content Remove="Logs\**" />
|
||||||
|
|
||||||
|
<EmbeddedResource Remove="Logs\**" />
|
||||||
|
<None Remove="Logs\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="appsettings.json" />
|
||||||
|
<Content Include="appsettings.json">
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<None Remove="appsettings.secrets.json" />
|
||||||
|
<Content Include="appsettings.secrets.json">
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"Default": "Server=10.10.10.200,1401;User Id=sa;Password=12341234+AbC;Database=AbpProject;TrustServerCertificate=true"
|
||||||
|
},
|
||||||
|
"OpenIddict": {
|
||||||
|
"Applications": {
|
||||||
|
"AbpProject_App": {
|
||||||
|
"ClientId": "AbpProject_App" },
|
||||||
|
"AbpProject_Swagger": {
|
||||||
|
"ClientId": "AbpProject_Swagger",
|
||||||
|
"RootUrl": "https://localhost:44364/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
public static class AbpProjectDomainErrorCodes
|
||||||
|
{
|
||||||
|
/* You can add your business exception error codes here, as constants */
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
using Skcks.Study.AbpProject.Localization;
|
||||||
|
using Volo.Abp.AuditLogging;
|
||||||
|
using Volo.Abp.BackgroundJobs;
|
||||||
|
using Volo.Abp.FeatureManagement;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.Localization;
|
||||||
|
using Volo.Abp.Localization.ExceptionHandling;
|
||||||
|
using Volo.Abp.Validation.Localization;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.PermissionManagement;
|
||||||
|
using Volo.Abp.SettingManagement;
|
||||||
|
using Volo.Abp.VirtualFileSystem;
|
||||||
|
using Volo.Abp.OpenIddict;
|
||||||
|
using Volo.Abp.BlobStoring.Database;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpAuditLoggingDomainSharedModule),
|
||||||
|
typeof(AbpBackgroundJobsDomainSharedModule),
|
||||||
|
typeof(AbpFeatureManagementDomainSharedModule),
|
||||||
|
typeof(AbpPermissionManagementDomainSharedModule),
|
||||||
|
typeof(AbpSettingManagementDomainSharedModule),
|
||||||
|
typeof(AbpIdentityDomainSharedModule),
|
||||||
|
typeof(AbpOpenIddictDomainSharedModule),
|
||||||
|
typeof(AbpTenantManagementDomainSharedModule),
|
||||||
|
typeof(BlobStoringDatabaseDomainSharedModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectDomainSharedModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
AbpProjectGlobalFeatureConfigurator.Configure();
|
||||||
|
AbpProjectModuleExtensionConfigurator.Configure();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
Configure<AbpVirtualFileSystemOptions>(options =>
|
||||||
|
{
|
||||||
|
options.FileSets.AddEmbedded<AbpProjectDomainSharedModule>();
|
||||||
|
});
|
||||||
|
|
||||||
|
Configure<AbpLocalizationOptions>(options =>
|
||||||
|
{
|
||||||
|
options.Resources
|
||||||
|
.Add<AbpProjectResource>("en")
|
||||||
|
.AddBaseTypes(typeof(AbpValidationResource))
|
||||||
|
.AddVirtualJson("/Localization/AbpProject");
|
||||||
|
|
||||||
|
options.DefaultResourceType = typeof(AbpProjectResource);
|
||||||
|
});
|
||||||
|
|
||||||
|
Configure<AbpExceptionLocalizationOptions>(options =>
|
||||||
|
{
|
||||||
|
options.MapCodeNamespace("AbpProject", typeof(AbpProjectResource));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using Volo.Abp.GlobalFeatures;
|
||||||
|
using Volo.Abp.Threading;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
public static class AbpProjectGlobalFeatureConfigurator
|
||||||
|
{
|
||||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
||||||
|
|
||||||
|
public static void Configure()
|
||||||
|
{
|
||||||
|
OneTimeRunner.Run(() =>
|
||||||
|
{
|
||||||
|
/* You can configure (enable/disable) global features of the used modules here.
|
||||||
|
* Please refer to the documentation to learn more about the Global Features System:
|
||||||
|
* https://docs.abp.io/en/abp/latest/Global-Features
|
||||||
|
*/
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.ObjectExtending;
|
||||||
|
using Volo.Abp.Threading;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
public static class AbpProjectModuleExtensionConfigurator
|
||||||
|
{
|
||||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
||||||
|
|
||||||
|
public static void Configure()
|
||||||
|
{
|
||||||
|
OneTimeRunner.Run(() =>
|
||||||
|
{
|
||||||
|
ConfigureExistingProperties();
|
||||||
|
ConfigureExtraProperties();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ConfigureExistingProperties()
|
||||||
|
{
|
||||||
|
/* You can change max lengths for properties of the
|
||||||
|
* entities defined in the modules used by your application.
|
||||||
|
*
|
||||||
|
* Example: Change user and role name max lengths
|
||||||
|
|
||||||
|
AbpUserConsts.MaxNameLength = 99;
|
||||||
|
IdentityRoleConsts.MaxNameLength = 99;
|
||||||
|
|
||||||
|
* Notice: It is not suggested to change property lengths
|
||||||
|
* unless you really need it. Go with the standard values wherever possible.
|
||||||
|
*
|
||||||
|
* If you are using EF Core, you will need to run the add-migration command after your changes.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ConfigureExtraProperties()
|
||||||
|
{
|
||||||
|
/* You can configure extra properties for the
|
||||||
|
* entities defined in the modules used by your application.
|
||||||
|
*
|
||||||
|
* This class can be used to define these extra properties
|
||||||
|
* with a high level, easy to use API.
|
||||||
|
*
|
||||||
|
* Example: Add a new property to the user entity of the identity module
|
||||||
|
|
||||||
|
ObjectExtensionManager.Instance.Modules()
|
||||||
|
.ConfigureIdentity(identity =>
|
||||||
|
{
|
||||||
|
identity.ConfigureUser(user =>
|
||||||
|
{
|
||||||
|
user.AddOrUpdateProperty<string>( //property type: string
|
||||||
|
"SocialSecurityNumber", //property name
|
||||||
|
property =>
|
||||||
|
{
|
||||||
|
//validation rules
|
||||||
|
property.Attributes.Add(new RequiredAttribute());
|
||||||
|
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
|
||||||
|
|
||||||
|
//...other configurations for this property
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
* See the documentation for more:
|
||||||
|
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace Skcks.Study.AbpProject.Categories;
|
||||||
|
|
||||||
|
public static class CategoryConsts
|
||||||
|
{
|
||||||
|
public const int MaxNameLength = 128;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "ar",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "منزل، بيت",
|
||||||
|
"Menu:ContactUs": "اتصل بنا",
|
||||||
|
"Menu:ArticleSample": "عينة المادة",
|
||||||
|
"Home": "منزل، بيت",
|
||||||
|
"Welcome": "مرحبا",
|
||||||
|
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء التشغيل يعتمد على إطار عمل برنامج ABP. لمزيد من المعلومات قم بزيارة",
|
||||||
|
"Date": "تاريخ",
|
||||||
|
"Permission:Dashboard": "لوحة القيادة",
|
||||||
|
"Menu:Dashboard": "لوحة القيادة",
|
||||||
|
"Menu:HomePage": "الصفحة الرئيسية",
|
||||||
|
"Dashboard": "لوحة القيادة",
|
||||||
|
"ExternalProvider:Google": "جوجل",
|
||||||
|
"ExternalProvider:Google:ClientId": "معرف العميل",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "سر العميل",
|
||||||
|
"ExternalProvider:Microsoft": "مايكروسوفت",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "معرف العميل",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "سر العميل",
|
||||||
|
"ExternalProvider:Twitter": "تويتر",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "مفتاح المستهلك",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "سر المستهلك",
|
||||||
|
"NewsletterHeader": "اشترك في النشرة الإخبارية!",
|
||||||
|
"NewsletterInfo": "احصل على معلومات حول آخر الأحداث.",
|
||||||
|
"NewsletterPreference_Default": "النشرة الإخبارية الافتراضية",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "أوافق على <a href='/privacy-policy'> سياسة الخصوصية </a>.",
|
||||||
|
"Language": "لغة",
|
||||||
|
"Search": "يبحث",
|
||||||
|
"LoadMore": "تحميل المزيد",
|
||||||
|
"Settings": "إعدادات",
|
||||||
|
"Theme": "سمة",
|
||||||
|
"DeviceTheme": "موضوع الجهاز",
|
||||||
|
"Dark": "مظلم",
|
||||||
|
"Light": "ضوء",
|
||||||
|
"Unspecified": "نظام",
|
||||||
|
"SeeAllUsers": "رؤية كافة المستخدمين",
|
||||||
|
"TakePhoto": "تصوير",
|
||||||
|
"ChoosePhoto": "اختر صورة"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "de-DE",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Home",
|
||||||
|
"Menu:ContactUs": "Kontaktiere uns",
|
||||||
|
"Menu:ArticleSample": "Artikelmuster",
|
||||||
|
"Home": "Home",
|
||||||
|
"Welcome": "Willkommen",
|
||||||
|
"LongWelcomeMessage": "Willkommen in der Anwendung. Dies ist ein Startup-Projekt basierend auf dem ABP-Framework. Weitere Informationen finden Sie unter",
|
||||||
|
"Date": "Datum",
|
||||||
|
"Permission:Dashboard": "Dashboard",
|
||||||
|
"Menu:Dashboard": "Dashboard",
|
||||||
|
"Menu:HomePage": "Startseite",
|
||||||
|
"Dashboard": "Dashboard",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Kunden ID",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Client-Geheimnis",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Kunden ID",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Client-Geheimnis",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Verbraucherschlüssel",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Verbrauchergeheimnis",
|
||||||
|
"NewsletterHeader": "Abonnieren Sie den Newsletter!",
|
||||||
|
"NewsletterInfo": "Informieren Sie sich über aktuelle Ereignisse.",
|
||||||
|
"NewsletterPreference_Default": "Standard-Newsletter",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Ich akzeptiere die <a href='/privacy-policy'>Datenschutzerklärung</a>.",
|
||||||
|
"Language": "Sprache",
|
||||||
|
"Search": "Suchen",
|
||||||
|
"LoadMore": "Mehr laden",
|
||||||
|
"Settings": "Einstellungen",
|
||||||
|
"Theme": "Thema",
|
||||||
|
"DeviceTheme": "Gerätethema",
|
||||||
|
"Dark": "Dunkel",
|
||||||
|
"Light": "Licht",
|
||||||
|
"Unspecified": "System",
|
||||||
|
"SeeAllUsers": "Alle Benutzer anzeigen",
|
||||||
|
"TakePhoto": "Foto machen",
|
||||||
|
"ChoosePhoto": "Wähle ein Foto aus"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Culture": "en",
|
||||||
|
"Texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Home",
|
||||||
|
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information visit",
|
||||||
|
"Welcome": "Welcome"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "es",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Hogar",
|
||||||
|
"Menu:ContactUs": "Contáctenos",
|
||||||
|
"Menu:ArticleSample": "Muestra de artículo",
|
||||||
|
"Home": "Hogar",
|
||||||
|
"Welcome": "Bienvenido",
|
||||||
|
"LongWelcomeMessage": "Bienvenido a la aplicacion. Este es un proyecto de inicio basado en el marco ABP. Para obtener mas informacion, visite",
|
||||||
|
"Date": "Fecha",
|
||||||
|
"Permission:Dashboard": "Panel de control",
|
||||||
|
"Menu:Dashboard": "Panel de control",
|
||||||
|
"Menu:HomePage": "Página de inicio",
|
||||||
|
"Dashboard": "Panel de control",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "ID de cliente",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "ID de cliente",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Clave de consumidor",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Consumer Secret",
|
||||||
|
"NewsletterHeader": "Suscríbete a la newsletter!",
|
||||||
|
"NewsletterInfo": "Obtenga información sobre los últimos acontecimientos.",
|
||||||
|
"NewsletterPreference_Default": "Boletín de noticias predeterminado",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Acepto la <a href='/privacy-policy'> Política de privacidad </a>.",
|
||||||
|
"Language": "Idioma",
|
||||||
|
"Search": "Buscar",
|
||||||
|
"LoadMore": "Carga más",
|
||||||
|
"Settings": "Ajustes",
|
||||||
|
"Theme": "Tema",
|
||||||
|
"DeviceTheme": "Tema del dispositivo",
|
||||||
|
"Dark": "Oscuro",
|
||||||
|
"Light": "Luz",
|
||||||
|
"Unspecified": "Sistema",
|
||||||
|
"SeeAllUsers": "Ver todos los usuarios",
|
||||||
|
"TakePhoto": "Tomar foto",
|
||||||
|
"ChoosePhoto": "Escoge una foto"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "fi",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Koti",
|
||||||
|
"Menu:ContactUs": "Ota meihin yhteyttä",
|
||||||
|
"Menu:ArticleSample": "Artikkelinäyte",
|
||||||
|
"Home": "Koti",
|
||||||
|
"Welcome": "Tervetuloa",
|
||||||
|
"LongWelcomeMessage": "Tervetuloa sovellukseen. Tämä on ABP-kehykseen perustuva käynnistysprojekti. Lisätietoja on osoitteessa",
|
||||||
|
"Date": "Päivämäärä",
|
||||||
|
"Permission:Dashboard": "Kojelauta",
|
||||||
|
"Menu:Dashboard": "Kojelauta",
|
||||||
|
"Menu:HomePage": "Kotisivu",
|
||||||
|
"Dashboard": "Kojelauta",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Asiakastunnus",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Asiakkaan salaisuus",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Asiakastunnus",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Asiakkaan salaisuus",
|
||||||
|
"ExternalProvider:Twitter": "Viserrys",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Kuluttaja-avain",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Kuluttajan salaisuus",
|
||||||
|
"NewsletterHeader": "Tilaa uutiskirje!",
|
||||||
|
"NewsletterInfo": "Hanki tietoa viimeisimmistä tapahtumista.",
|
||||||
|
"NewsletterPreference_Default": "Oletusuutiskirje",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Hyväksyn <a href='/privacy-policy'> tietosuojakäytännön </a>.",
|
||||||
|
"Language": "Kieli",
|
||||||
|
"Search": "Hae",
|
||||||
|
"LoadMore": "Lataa lisää",
|
||||||
|
"Settings": "asetukset",
|
||||||
|
"Theme": "Teema",
|
||||||
|
"DeviceTheme": "Laitteen teema",
|
||||||
|
"Dark": "Tumma",
|
||||||
|
"Light": "Kevyt",
|
||||||
|
"Unspecified": "Järjestelmä",
|
||||||
|
"SeeAllUsers": "Katso Kaikki käyttäjät",
|
||||||
|
"TakePhoto": "Ota valokuva",
|
||||||
|
"ChoosePhoto": "Valitse Valokuva"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "fr",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Acceuil",
|
||||||
|
"Menu:ContactUs": "Nous contacter",
|
||||||
|
"Menu:ArticleSample": "Échantillon d'article",
|
||||||
|
"Home": "Acceuil",
|
||||||
|
"Welcome": "Bienvenue",
|
||||||
|
"LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez",
|
||||||
|
"Date": "Date",
|
||||||
|
"Permission:Dashboard": "Tableau de bord",
|
||||||
|
"Menu:Dashboard": "Tableau de bord",
|
||||||
|
"Menu:HomePage": "Page d'accueil",
|
||||||
|
"Dashboard": "Tableau de bord",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "identité du client",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Secret du client",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "identité du client",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Secret du client",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "La clé du consommateur",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Secret du consommateur",
|
||||||
|
"NewsletterHeader": "Abonnez-vous à la newsletter!",
|
||||||
|
"NewsletterInfo": "Obtenez des informations sur les derniers événements.",
|
||||||
|
"NewsletterPreference_Default": "Newsletter par défaut",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "J'accepte la <a href='/privacy-policy'> Politique de confidentialité </a>.",
|
||||||
|
"Language": "Langue",
|
||||||
|
"Search": "Recherche",
|
||||||
|
"LoadMore": "Charger plus",
|
||||||
|
"Settings": "Paramètres",
|
||||||
|
"Theme": "Thème",
|
||||||
|
"DeviceTheme": "Thème de l'appareil",
|
||||||
|
"Dark": "Sombre",
|
||||||
|
"Light": "Lumière",
|
||||||
|
"Unspecified": "Système",
|
||||||
|
"SeeAllUsers": "Voir tous les utilisateurs",
|
||||||
|
"TakePhoto": "Prendre une photo",
|
||||||
|
"ChoosePhoto": "Choisissez une photo"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "hi",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "घर",
|
||||||
|
"Menu:ContactUs": "संपर्क करें",
|
||||||
|
"Menu:ArticleSample": "आलेख नमूना",
|
||||||
|
"Home": "घर",
|
||||||
|
"Welcome": "स्वागत हे",
|
||||||
|
"LongWelcomeMessage": "आवेदन करने के लिए आपका स्वागत है। यह एबीपी ढांचे पर आधारित एक स्टार्टअप परियोजना है। अधिक जानकारी के लिए पर जाएँ।",
|
||||||
|
"Date": "दिनांक",
|
||||||
|
"Permission:Dashboard": "डैशबोर्ड",
|
||||||
|
"Menu:Dashboard": "डैशबोर्ड",
|
||||||
|
"Menu:HomePage": "मुख पृष्ठ",
|
||||||
|
"Dashboard": "डैशबोर्ड",
|
||||||
|
"ExternalProvider:Google": "गूगल",
|
||||||
|
"ExternalProvider:Google:ClientId": "ग्राहक ID",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "ग्राहक गुप्त",
|
||||||
|
"ExternalProvider:Microsoft": "माइक्रोसॉफ्ट",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "ग्राहक ID",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "ग्राहक गुप्त",
|
||||||
|
"ExternalProvider:Twitter": "ट्विटर",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "उपभोक्ता कुंजी",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "उपभोक्ता रहस्य",
|
||||||
|
"NewsletterHeader": "न्यूज़लेटर की सदस्यता लें!",
|
||||||
|
"NewsletterInfo": "नवीनतम घटनाओं के बारे में जानकारी प्राप्त करें।",
|
||||||
|
"NewsletterPreference_Default": "डिफ़ॉल्ट न्यूज़लैटर",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "मैं <a href='/privacy-policy'> गोपनीयता नीति </a> स्वीकार करता हूं।",
|
||||||
|
"Language": "भाषा",
|
||||||
|
"Search": "खोज",
|
||||||
|
"LoadMore": "और लोड करें",
|
||||||
|
"Settings": "समायोजन",
|
||||||
|
"Theme": "विषय",
|
||||||
|
"DeviceTheme": "डिवाइस थीम",
|
||||||
|
"Dark": "अँधेरा",
|
||||||
|
"Light": "रोशनी",
|
||||||
|
"Unspecified": "प्रणाली",
|
||||||
|
"SeeAllUsers": "सभी उपयोगकर्ता देखें",
|
||||||
|
"TakePhoto": "फोटो लो",
|
||||||
|
"ChoosePhoto": "तस्विर का चयन करो"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"culture": "hr",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Dom",
|
||||||
|
"Menu:ContactUs": "Kontaktirajte nas",
|
||||||
|
"Menu:ArticleSample": "Uzorak članka",
|
||||||
|
"Home": "Dom",
|
||||||
|
"Welcome": "Dobrodošli",
|
||||||
|
"LongWelcomeMessage": "Dobrodošli u aplikaciju. Ovo je startup projekt temeljen na ABP okviru. Za više informacija posjetite",
|
||||||
|
"Date": "Datum",
|
||||||
|
"Permission:Dashboard": "Nadzorna ploča",
|
||||||
|
"Menu:Dashboard": "Nadzorna ploča",
|
||||||
|
"Menu:HomePage": "Početna stranica",
|
||||||
|
"Dashboard": "Nadzorna ploča",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "ID klijenta",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Tajna klijenta",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "ID klijenta",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Tajna klijenta",
|
||||||
|
"ExternalProvider:Twitter": "Cvrkut",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Ključ potrošača",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Potrošačka tajna",
|
||||||
|
"NewsletterHeader": "Pretplatite se na newsletter!",
|
||||||
|
"NewsletterInfo": "Dobijte informacije o najnovijim događanjima.",
|
||||||
|
"NewsletterPreference_Default": "Zadani bilten",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Prihvaćam <a href='/privacy-policy'>Politiku privatnosti</a> .",
|
||||||
|
"Language": "Jezik",
|
||||||
|
"Search": "traži",
|
||||||
|
"LoadMore": "Učitaj više",
|
||||||
|
"Settings": "postavke",
|
||||||
|
"Theme": "Tema",
|
||||||
|
"DeviceTheme": "Tema uređaja",
|
||||||
|
"Dark": "tamno",
|
||||||
|
"Light": "Svjetlo",
|
||||||
|
"Unspecified": "Sustav",
|
||||||
|
"SeeAllUsers": "Vidi sve korisnike",
|
||||||
|
"TakePhoto": "Uslikaj",
|
||||||
|
"ChoosePhoto": "Odaberite fotografiju"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "hu",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Kezdőlap",
|
||||||
|
"Menu:ContactUs": "Lépjen kapcsolatba velünk",
|
||||||
|
"Menu:ArticleSample": "Cikkminta",
|
||||||
|
"Home": "Kezdőlap",
|
||||||
|
"Welcome": "Üdvözöljük",
|
||||||
|
"LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információért látogasson el az oldalra",
|
||||||
|
"Date": "dátum",
|
||||||
|
"Permission:Dashboard": "Irányítópult",
|
||||||
|
"Menu:Dashboard": "Irányítópult",
|
||||||
|
"Menu:HomePage": "Kezdőlap",
|
||||||
|
"Dashboard": "Irányítópult",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Ügyfélazonosító",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Ügyfél titkos kulcs",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Ügyfélazonosító",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Ügyfél titkos kulcs",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Fogyasztói kulcs",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Fogyasztói titkos kulcs",
|
||||||
|
"NewsletterHeader": "Iratkozz fel a hírlevélre!",
|
||||||
|
"NewsletterInfo": "Tájékozódjon a legfrissebb eseményekről.",
|
||||||
|
"NewsletterPreference_Default": "Alapértelmezett hírlevél",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Elfogadom az <a href='/privacy-policy'>Adatvédelmi szabályzatot</a> .",
|
||||||
|
"Language": "Nyelv",
|
||||||
|
"Search": "Keresés",
|
||||||
|
"LoadMore": "Load More",
|
||||||
|
"Settings": "Beállítások",
|
||||||
|
"Theme": "Téma",
|
||||||
|
"DeviceTheme": "Eszköz téma",
|
||||||
|
"Dark": "Sötét",
|
||||||
|
"Light": "Fény",
|
||||||
|
"Unspecified": "Rendszer",
|
||||||
|
"SeeAllUsers": "Lásd: Összes felhasználó",
|
||||||
|
"TakePhoto": "Fotót készíteni",
|
||||||
|
"ChoosePhoto": "Válassz képet"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "it",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Home",
|
||||||
|
"Menu:ContactUs": "Contattaci",
|
||||||
|
"Menu:ArticleSample": "Esempio di articolo",
|
||||||
|
"Home": "Home",
|
||||||
|
"Welcome": "Benvenuto",
|
||||||
|
"LongWelcomeMessage": "Benvenuto nell'applicazione. Questo è un progetto di avvio basato sul framework ABP. Per maggiori informazioni visita",
|
||||||
|
"Date": "Data",
|
||||||
|
"Permission:Dashboard": "Cruscotto",
|
||||||
|
"Menu:Dashboard": "Cruscotto",
|
||||||
|
"Menu:HomePage": "Pagina iniziale",
|
||||||
|
"Dashboard": "Cruscotto",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Client ID",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Client ID",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Consumer Key",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Consumer Secret",
|
||||||
|
"NewsletterHeader": "Iscriviti alla newsletter!",
|
||||||
|
"NewsletterInfo": "Ottieni informazioni sugli ultimi avvenimenti.",
|
||||||
|
"NewsletterPreference_Default": "Newsletter predefinita",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Accetto la <a href='/privacy-policy'>Informativa sulla privacy</a>.",
|
||||||
|
"Language": "Lingua",
|
||||||
|
"Search": "Ricerca",
|
||||||
|
"LoadMore": "Carica altro",
|
||||||
|
"Settings": "Impostazioni",
|
||||||
|
"Theme": "Tema",
|
||||||
|
"DeviceTheme": "Tema del dispositivo",
|
||||||
|
"Dark": "Buio",
|
||||||
|
"Light": "Leggero",
|
||||||
|
"Unspecified": "Sistema",
|
||||||
|
"SeeAllUsers": "Visualizza tutti gli utenti",
|
||||||
|
"TakePhoto": "Fare foto",
|
||||||
|
"ChoosePhoto": "Scegli la foto"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "pt-BR",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Principal",
|
||||||
|
"Menu:ContactUs": "Entre em contato conosco",
|
||||||
|
"Menu:ArticleSample": "Amostra de Artigo",
|
||||||
|
"Home": "Casa",
|
||||||
|
"Welcome": "Seja bem-vindo!",
|
||||||
|
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite",
|
||||||
|
"Date": "Data",
|
||||||
|
"Permission:Dashboard": "Painel",
|
||||||
|
"Menu:Dashboard": "Painel",
|
||||||
|
"Menu:HomePage": "Pagina inicial",
|
||||||
|
"Dashboard": "Painel",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "ID do Cliente",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Segredo do cliente",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "ID do Cliente",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Segredo do cliente",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Chave do consumidor",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "consumidor secreto",
|
||||||
|
"NewsletterHeader": "Assine a newsletter!",
|
||||||
|
"NewsletterInfo": "Obtenha informações sobre os últimos acontecimentos.",
|
||||||
|
"NewsletterPreference_Default": "Boletim informativo padrão",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Eu aceito a <a href='/privacy-policy'> Política de Privacidade </a>.",
|
||||||
|
"Language": "Linguagem",
|
||||||
|
"Search": "Procurar",
|
||||||
|
"LoadMore": "Carregue mais",
|
||||||
|
"Settings": "Configurações",
|
||||||
|
"Theme": "Tema",
|
||||||
|
"DeviceTheme": "Tema do dispositivo",
|
||||||
|
"Dark": "Escuro",
|
||||||
|
"Light": "Luz",
|
||||||
|
"Unspecified": "Sistema",
|
||||||
|
"SeeAllUsers": "Ver todos os usuários",
|
||||||
|
"TakePhoto": "Tirar fotos",
|
||||||
|
"ChoosePhoto": "Escolher Foto"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "ru",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Дома",
|
||||||
|
"Menu:ContactUs": "Связаться с нами",
|
||||||
|
"Menu:ArticleSample": "Образец статьи",
|
||||||
|
"Home": "Дома",
|
||||||
|
"Welcome": "Добро пожаловать",
|
||||||
|
"LongWelcomeMessage": "Добро пожаловать в приложение. Это стартап-проект, основанный на структуре ABP. Для получения дополнительной информации посетите сайт",
|
||||||
|
"Date": "датировать",
|
||||||
|
"Permission:Dashboard": "Панель приборов",
|
||||||
|
"Menu:Dashboard": "Панель приборов",
|
||||||
|
"Menu:HomePage": "Домашняя страница",
|
||||||
|
"Dashboard": "Панель приборов",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "ID клиента",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Секрет клиента",
|
||||||
|
"ExternalProvider:Microsoft": "Майкрософт",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "ID клиента",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Секрет клиента",
|
||||||
|
"ExternalProvider:Twitter": "Твиттер",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Потребительский ключ",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Потребительский секрет",
|
||||||
|
"NewsletterHeader": "Подпишитесь на рассылку!",
|
||||||
|
"NewsletterInfo": "Получайте информацию о последних событиях.",
|
||||||
|
"NewsletterPreference_Default": "Информационный бюллетень по умолчанию",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Я принимаю <a href='/privacy-policy'>Политику конфиденциальности</a>.",
|
||||||
|
"Language": "Язык",
|
||||||
|
"Search": "Поиск",
|
||||||
|
"LoadMore": "Загрузи больше",
|
||||||
|
"Settings": "Настройки",
|
||||||
|
"Theme": "Тема",
|
||||||
|
"DeviceTheme": "Тема устройства",
|
||||||
|
"Dark": "Темный",
|
||||||
|
"Light": "Свет",
|
||||||
|
"Unspecified": "Система",
|
||||||
|
"SeeAllUsers": "Просмотреть всех пользователей",
|
||||||
|
"TakePhoto": "Сделать фотографию",
|
||||||
|
"ChoosePhoto": "Выбрать фото"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "sk",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Domov",
|
||||||
|
"Menu:ContactUs": "Kontaktujte nás",
|
||||||
|
"Menu:ArticleSample": "Ukážka článku",
|
||||||
|
"Home": "Domov",
|
||||||
|
"Welcome": "Vitajte",
|
||||||
|
"LongWelcomeMessage": "Vitajte v aplikácii. Toto je štartovací projekt založený na ABP frameworku. Viac informácií nájdete na stránke",
|
||||||
|
"Date": "Dátum",
|
||||||
|
"Permission:Dashboard": "Dashboard",
|
||||||
|
"Menu:Dashboard": "Dashboard",
|
||||||
|
"Menu:HomePage": "Domovská stránka",
|
||||||
|
"Dashboard": "Dashboard",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Client ID",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Client ID",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Consumer Key",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Consumer Secret",
|
||||||
|
"NewsletterHeader": "Prihláste sa na odber noviniek!",
|
||||||
|
"NewsletterInfo": "Získajte informácie o najnovšiom dianí.",
|
||||||
|
"NewsletterPreference_Default": "Predvolený odber noviniek",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Súhlasím so <a href='/privacy-policy'>Zásadami ochrany osobných údajov</a>.",
|
||||||
|
"Language": "Jazyk",
|
||||||
|
"Search": "Vyhľadávanie",
|
||||||
|
"LoadMore": "Načítať viac",
|
||||||
|
"Settings": "nastavenie",
|
||||||
|
"Theme": "Téma",
|
||||||
|
"DeviceTheme": "Téma zariadenia",
|
||||||
|
"Dark": "Tmavý",
|
||||||
|
"Light": "Svetlo",
|
||||||
|
"Unspecified": "Systém",
|
||||||
|
"SeeAllUsers": "Pozrite si Všetci používatelia",
|
||||||
|
"TakePhoto": "Odfoť",
|
||||||
|
"ChoosePhoto": "Vyberte fotografiu"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "sl",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Domov",
|
||||||
|
"Menu:ContactUs": "Kontaktiraj nas",
|
||||||
|
"Menu:ArticleSample": "Vzorec članka",
|
||||||
|
"Home": "Domov",
|
||||||
|
"Welcome": "Dobrodošli",
|
||||||
|
"LongWelcomeMessage": "Dobrodošli v aplikaciji. To je osnovni projekt, ki temelji na razvojnem okolju ABP. Za več informacij obiščite",
|
||||||
|
"Date": "datum",
|
||||||
|
"Permission:Dashboard": "Nadzorna plošča",
|
||||||
|
"Menu:Dashboard": "Nadzorna plošča",
|
||||||
|
"Menu:HomePage": "Domača stran",
|
||||||
|
"Dashboard": "Nadzorna plošča",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "ID stranke",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Skrivnost stranke",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "ID stranke",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Skrivnost stranke",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Potrošniški ključ",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Potrošnikova skrivnost",
|
||||||
|
"NewsletterHeader": "Naročite se na novice!",
|
||||||
|
"NewsletterInfo": "Pridobite informacije o najnovejših dogodkih.",
|
||||||
|
"NewsletterPreference_Default": "Privzeto glasilo",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "Sprejemam <a href='/privacy-policy'>pravilnik o zasebnosti</a>.",
|
||||||
|
"Language": "Jezik",
|
||||||
|
"Search": "Iskanje",
|
||||||
|
"LoadMore": "Naloži več",
|
||||||
|
"Settings": "nastavitve",
|
||||||
|
"Theme": "Tema",
|
||||||
|
"DeviceTheme": "Tema naprave",
|
||||||
|
"Dark": "Temno",
|
||||||
|
"Light": "Svetloba",
|
||||||
|
"Unspecified": "Sistem",
|
||||||
|
"SeeAllUsers": "Glejte Vsi uporabniki",
|
||||||
|
"TakePhoto": "Posnemi fotografijo",
|
||||||
|
"ChoosePhoto": "Izberite fotografijo"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"culture": "tr",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "Ana sayfa",
|
||||||
|
"Menu:ContactUs": "Bize Ulaşın",
|
||||||
|
"Menu:ArticleSample": "Yazı Örneği",
|
||||||
|
"Home": "Ana sayfa",
|
||||||
|
"Welcome": "Hoşgeldiniz",
|
||||||
|
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için ziyaret edebilirsiniz",
|
||||||
|
"Date": "Tarih",
|
||||||
|
"Permission:Dashboard": "Genel görünüm",
|
||||||
|
"Menu:Dashboard": "Genel görünüm",
|
||||||
|
"Menu:HomePage": "ana sayfa",
|
||||||
|
"Dashboard": "Genel görünüm",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Client ID",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Client ID",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Consumer Key",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Consumer Secret",
|
||||||
|
"NewsletterHeader": "Bültene abone olun!",
|
||||||
|
"NewsletterInfo": "Son gelişmeler hakkında bilgi alın.",
|
||||||
|
"NewsletterPreference_Default": "Varsayılan Bülten",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "<a href='/privacy-policy'>Gizlilik Politikası</a>'nı kabul ediyorum.",
|
||||||
|
"Language": "Dil",
|
||||||
|
"Search": "Ara",
|
||||||
|
"LoadMore": "Daha fazla yükle",
|
||||||
|
"Settings": "Ayarlar",
|
||||||
|
"Theme": "Tema",
|
||||||
|
"DeviceTheme": "Cihaz Teması",
|
||||||
|
"Dark": "Koyu",
|
||||||
|
"Light": "Açık",
|
||||||
|
"Unspecified": "Sistem",
|
||||||
|
"SeeAllUsers": "Tüm Kullanıcıları Gör",
|
||||||
|
"TakePhoto": "Fotoğraf Çek",
|
||||||
|
"ChoosePhoto": "Fotoğraf Seç"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"culture": "zh-Hans",
|
||||||
|
"texts": {
|
||||||
|
"AppName": "AbpProject",
|
||||||
|
"Menu:Home": "首页",
|
||||||
|
"Menu:ContactUs": "联系我们",
|
||||||
|
"Menu:ArticleSample": "文章示例",
|
||||||
|
"Home": "首页",
|
||||||
|
"Welcome": "欢迎",
|
||||||
|
"LongWelcomeMessage": "欢迎使用本应用程序。这是一个基于 ABP 框架的启动项目。欲了解更多信息,请访问",
|
||||||
|
"Date": "日期",
|
||||||
|
"Permission:Dashboard": "仪表板",
|
||||||
|
"Menu:Dashboard": "仪表板",
|
||||||
|
"Menu:HomePage": "主页",
|
||||||
|
"Dashboard": "仪表板",
|
||||||
|
"ExternalProvider:Google": "Google",
|
||||||
|
"ExternalProvider:Google:ClientId": "Client Id",
|
||||||
|
"ExternalProvider:Google:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Microsoft": "Microsoft",
|
||||||
|
"ExternalProvider:Microsoft:ClientId": "Client Id",
|
||||||
|
"ExternalProvider:Microsoft:ClientSecret": "Client Secret",
|
||||||
|
"ExternalProvider:Twitter": "Twitter",
|
||||||
|
"ExternalProvider:Twitter:ConsumerKey": "Consumer Key",
|
||||||
|
"ExternalProvider:Twitter:ConsumerSecret": "Consumer Secret",
|
||||||
|
"NewsletterHeader": "订阅时事通讯!",
|
||||||
|
"NewsletterInfo": "了解最新动态。",
|
||||||
|
"NewsletterPreference_Default": "默认通讯",
|
||||||
|
"NewsletterPrivacyAcceptMessage": "我接受<a href='/privacy-policy'>隐私政策</a>。",
|
||||||
|
"Language": "语言",
|
||||||
|
"Search": "搜索",
|
||||||
|
"LoadMore": "加载更多",
|
||||||
|
"Settings": "设置",
|
||||||
|
"Theme": "主题",
|
||||||
|
"DeviceTheme": "设备主题",
|
||||||
|
"Dark": "Dark",
|
||||||
|
"Light": "Light",
|
||||||
|
"Unspecified": "System",
|
||||||
|
"SeeAllUsers": "查看所有用户",
|
||||||
|
"TakePhoto": "拍摄照片",
|
||||||
|
"ChoosePhoto": "选择照片",
|
||||||
|
"Menu:ProductManagement": "产品管理",
|
||||||
|
"Menu:Products": "产品",
|
||||||
|
"Name": "名称",
|
||||||
|
"CategoryName": "类别",
|
||||||
|
"Price": "价格",
|
||||||
|
"StockState": "状态",
|
||||||
|
"Enum:StockState:0": "预购",
|
||||||
|
"Enum:StockState:1": "已入库",
|
||||||
|
"Enum:StockState:2": "不可用",
|
||||||
|
"Enum:StockState:3": "已停用",
|
||||||
|
"CreationTime": "创建时间",
|
||||||
|
"NewProduct": "新产品",
|
||||||
|
"Category": "类别",
|
||||||
|
"IsFreeCargo": "包邮",
|
||||||
|
"ReleaseDate": "发布时间",
|
||||||
|
"ProductDeletionConfirmationMessage": "确认要删除该产品吗",
|
||||||
|
"SuccessfullyDeleted": "删除成功"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
using Volo.Abp.Localization;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Localization;
|
||||||
|
|
||||||
|
[LocalizationResourceName("AbpProject")]
|
||||||
|
public class AbpProjectResource
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
namespace Skcks.Study.AbpProject.MultiTenancy;
|
||||||
|
|
||||||
|
public static class MultiTenancyConsts
|
||||||
|
{
|
||||||
|
/* Enable/disable multi-tenancy easily in a single point.
|
||||||
|
* If you will never need to multi-tenancy, you can remove
|
||||||
|
* related modules and code parts, including this file.
|
||||||
|
*/
|
||||||
|
public const bool IsEnabled = true;
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public class ProductConsts
|
||||||
|
{
|
||||||
|
public const int MaxNameLength = 128;
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public enum ProductStockState : byte
|
||||||
|
{
|
||||||
|
PreOrder,
|
||||||
|
InStock,
|
||||||
|
NotAvailable,
|
||||||
|
Stopped
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"role": "lib.domain-shared"
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Skcks.Study.AbpProject</RootNamespace>
|
||||||
|
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.BlobStoring.Database.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.GlobalFeatures" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Localization\AbpProject\*.json" />
|
||||||
|
<Content Remove="Localization\AbpProject\*.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,11 @@
|
|||||||
|
using Volo.Abp.Identity;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
public static class AbpProjectConsts
|
||||||
|
{
|
||||||
|
public const string DbTablePrefix = "App";
|
||||||
|
public const string? DbSchema = null;
|
||||||
|
public const string AdminEmailDefaultValue = IdentityDataSeedContributor.AdminEmailDefaultValue;
|
||||||
|
public const string AdminPasswordDefaultValue = IdentityDataSeedContributor.AdminPasswordDefaultValue;
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
using Skcks.Study.AbpProject.Localization;
|
||||||
|
using Skcks.Study.AbpProject.MultiTenancy;
|
||||||
|
using Volo.Abp.Localization;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
using Volo.Abp.PermissionManagement.Identity;
|
||||||
|
using Volo.Abp.SettingManagement;
|
||||||
|
using Volo.Abp.BlobStoring.Database;
|
||||||
|
using Volo.Abp.Caching;
|
||||||
|
using Volo.Abp.OpenIddict;
|
||||||
|
using Volo.Abp.PermissionManagement.OpenIddict;
|
||||||
|
using Volo.Abp.AuditLogging;
|
||||||
|
using Volo.Abp.BackgroundJobs;
|
||||||
|
using Volo.Abp.Emailing;
|
||||||
|
using Volo.Abp.FeatureManagement;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpProjectDomainSharedModule),
|
||||||
|
typeof(AbpAuditLoggingDomainModule),
|
||||||
|
typeof(AbpCachingModule),
|
||||||
|
typeof(AbpBackgroundJobsDomainModule),
|
||||||
|
typeof(AbpFeatureManagementDomainModule),
|
||||||
|
typeof(AbpPermissionManagementDomainIdentityModule),
|
||||||
|
typeof(AbpPermissionManagementDomainOpenIddictModule),
|
||||||
|
typeof(AbpSettingManagementDomainModule),
|
||||||
|
typeof(AbpEmailingModule),
|
||||||
|
typeof(AbpIdentityDomainModule),
|
||||||
|
typeof(AbpOpenIddictDomainModule),
|
||||||
|
typeof(AbpTenantManagementDomainModule),
|
||||||
|
typeof(BlobStoringDatabaseDomainModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectDomainModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
Configure<AbpMultiTenancyOptions>(options =>
|
||||||
|
{
|
||||||
|
options.IsEnabled = MultiTenancyConsts.IsEnabled;
|
||||||
|
});
|
||||||
|
|
||||||
|
Configure<AbpLocalizationOptions>(options =>
|
||||||
|
{
|
||||||
|
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
|
||||||
|
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
|
||||||
|
options.Languages.Add(new LanguageInfo("en", "en", "English"));
|
||||||
|
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
|
||||||
|
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
|
||||||
|
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
|
||||||
|
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
|
||||||
|
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi"));
|
||||||
|
options.Languages.Add(new LanguageInfo("it", "it", "Italiano"));
|
||||||
|
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
|
||||||
|
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
|
||||||
|
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
|
||||||
|
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
|
||||||
|
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
|
||||||
|
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
|
||||||
|
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch"));
|
||||||
|
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Categories;
|
||||||
|
|
||||||
|
public class Category : AuditedAggregateRoot<Guid>
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Skcks.Study.AbpProject.Categories;
|
||||||
|
using Skcks.Study.AbpProject.Products;
|
||||||
|
using Volo.Abp.Data;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Data;
|
||||||
|
|
||||||
|
public class AbpProjectDataSeedContributor:IDataSeedContributor,ITransientDependency
|
||||||
|
{
|
||||||
|
private readonly IRepository<Category, Guid> _categoryRepository;
|
||||||
|
private readonly IRepository<Product, Guid> _productRepository;
|
||||||
|
|
||||||
|
public AbpProjectDataSeedContributor(IRepository<Category, Guid> categoryRepository, IRepository<Product, Guid> productRepository)
|
||||||
|
{
|
||||||
|
_categoryRepository = categoryRepository;
|
||||||
|
_productRepository = productRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task SeedAsync(DataSeedContext context)
|
||||||
|
{
|
||||||
|
if (await _categoryRepository.CountAsync() > 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var testCategory = new Category
|
||||||
|
{
|
||||||
|
Name = "Test Category",
|
||||||
|
};
|
||||||
|
await _categoryRepository.InsertManyAsync(new List<Category> { testCategory});
|
||||||
|
|
||||||
|
var testProduct = new Product
|
||||||
|
{
|
||||||
|
Category = testCategory,
|
||||||
|
Name = "测试商品",
|
||||||
|
Price = 99999,
|
||||||
|
ReleaseDate = DateTime.Now,
|
||||||
|
StockState = ProductStockState.NotAvailable
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
await _productRepository.InsertManyAsync(new List<Product> { testProduct });
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,221 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Logging.Abstractions;
|
||||||
|
using Volo.Abp.Data;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Data;
|
||||||
|
|
||||||
|
public class AbpProjectDbMigrationService : ITransientDependency
|
||||||
|
{
|
||||||
|
public ILogger<AbpProjectDbMigrationService> Logger { get; set; }
|
||||||
|
|
||||||
|
private readonly IDataSeeder _dataSeeder;
|
||||||
|
private readonly IEnumerable<IAbpProjectDbSchemaMigrator> _dbSchemaMigrators;
|
||||||
|
private readonly ITenantRepository _tenantRepository;
|
||||||
|
private readonly ICurrentTenant _currentTenant;
|
||||||
|
|
||||||
|
public AbpProjectDbMigrationService(
|
||||||
|
IDataSeeder dataSeeder,
|
||||||
|
ITenantRepository tenantRepository,
|
||||||
|
ICurrentTenant currentTenant,
|
||||||
|
IEnumerable<IAbpProjectDbSchemaMigrator> dbSchemaMigrators)
|
||||||
|
{
|
||||||
|
_dataSeeder = dataSeeder;
|
||||||
|
_tenantRepository = tenantRepository;
|
||||||
|
_currentTenant = currentTenant;
|
||||||
|
_dbSchemaMigrators = dbSchemaMigrators;
|
||||||
|
|
||||||
|
Logger = NullLogger<AbpProjectDbMigrationService>.Instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task MigrateAsync()
|
||||||
|
{
|
||||||
|
var initialMigrationAdded = AddInitialMigrationIfNotExist();
|
||||||
|
|
||||||
|
if (initialMigrationAdded)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.LogInformation("Started database migrations...");
|
||||||
|
|
||||||
|
await MigrateDatabaseSchemaAsync();
|
||||||
|
await SeedDataAsync();
|
||||||
|
|
||||||
|
Logger.LogInformation($"Successfully completed host database migrations.");
|
||||||
|
|
||||||
|
var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
|
||||||
|
|
||||||
|
var migratedDatabaseSchemas = new HashSet<string>();
|
||||||
|
foreach (var tenant in tenants)
|
||||||
|
{
|
||||||
|
using (_currentTenant.Change(tenant.Id))
|
||||||
|
{
|
||||||
|
if (tenant.ConnectionStrings.Any())
|
||||||
|
{
|
||||||
|
var tenantConnectionStrings = tenant.ConnectionStrings
|
||||||
|
.Select(x => x.Value)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
|
||||||
|
{
|
||||||
|
await MigrateDatabaseSchemaAsync(tenant);
|
||||||
|
|
||||||
|
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await SeedDataAsync(tenant);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.LogInformation("Successfully completed all database migrations.");
|
||||||
|
Logger.LogInformation("You can safely end this process...");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
|
||||||
|
{
|
||||||
|
Logger.LogInformation(
|
||||||
|
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
|
||||||
|
|
||||||
|
foreach (var migrator in _dbSchemaMigrators)
|
||||||
|
{
|
||||||
|
await migrator.MigrateAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task SeedDataAsync(Tenant? tenant = null)
|
||||||
|
{
|
||||||
|
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
|
||||||
|
|
||||||
|
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
|
||||||
|
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName,
|
||||||
|
AbpProjectConsts.AdminEmailDefaultValue)
|
||||||
|
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName,
|
||||||
|
AbpProjectConsts.AdminPasswordDefaultValue)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool AddInitialMigrationIfNotExist()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!DbMigrationsProjectExists())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MigrationsFolderExists())
|
||||||
|
{
|
||||||
|
AddInitialMigration();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool DbMigrationsProjectExists()
|
||||||
|
{
|
||||||
|
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
|
||||||
|
|
||||||
|
return dbMigrationsProjectFolder != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool MigrationsFolderExists()
|
||||||
|
{
|
||||||
|
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
|
||||||
|
|
||||||
|
return dbMigrationsProjectFolder != null && Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddInitialMigration()
|
||||||
|
{
|
||||||
|
Logger.LogInformation("Creating initial migration...");
|
||||||
|
|
||||||
|
string argumentPrefix;
|
||||||
|
string fileName;
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
{
|
||||||
|
argumentPrefix = "-c";
|
||||||
|
fileName = "/bin/bash";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
argumentPrefix = "/C";
|
||||||
|
fileName = "cmd.exe";
|
||||||
|
}
|
||||||
|
|
||||||
|
var procStartInfo = new ProcessStartInfo(fileName,
|
||||||
|
$"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\""
|
||||||
|
);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Process.Start(procStartInfo);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw new Exception("Couldn't run ABP CLI...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? GetEntityFrameworkCoreProjectFolderPath()
|
||||||
|
{
|
||||||
|
var slnDirectoryPath = GetSolutionDirectoryPath();
|
||||||
|
|
||||||
|
if (slnDirectoryPath == null)
|
||||||
|
{
|
||||||
|
throw new Exception("Solution folder not found!");
|
||||||
|
}
|
||||||
|
|
||||||
|
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
|
||||||
|
|
||||||
|
return Directory.GetDirectories(srcDirectoryPath)
|
||||||
|
.FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string? GetSolutionDirectoryPath()
|
||||||
|
{
|
||||||
|
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
|
||||||
|
|
||||||
|
while (currentDirectory != null && Directory.GetParent(currentDirectory.FullName) != null)
|
||||||
|
{
|
||||||
|
currentDirectory = Directory.GetParent(currentDirectory.FullName);
|
||||||
|
|
||||||
|
if (currentDirectory != null && Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
|
||||||
|
{
|
||||||
|
return currentDirectory.FullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Data;
|
||||||
|
|
||||||
|
public interface IAbpProjectDbSchemaMigrator
|
||||||
|
{
|
||||||
|
Task MigrateAsync();
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Data;
|
||||||
|
|
||||||
|
/* This is used if database provider does't define
|
||||||
|
* IAbpProjectDbSchemaMigrator implementation.
|
||||||
|
*/
|
||||||
|
public class NullAbpProjectDbSchemaMigrator : IAbpProjectDbSchemaMigrator, ITransientDependency
|
||||||
|
{
|
||||||
|
public Task MigrateAsync()
|
||||||
|
{
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,361 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
using OpenIddict.Abstractions;
|
||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.Authorization.Permissions;
|
||||||
|
using Volo.Abp.Data;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.OpenIddict.Applications;
|
||||||
|
using Volo.Abp.OpenIddict.Scopes;
|
||||||
|
using Volo.Abp.PermissionManagement;
|
||||||
|
using Volo.Abp.Uow;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.OpenIddict;
|
||||||
|
|
||||||
|
/* Creates initial data that is needed to property run the application
|
||||||
|
* and make client-to-server communication possible.
|
||||||
|
*/
|
||||||
|
public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDependency
|
||||||
|
{
|
||||||
|
private readonly IConfiguration _configuration;
|
||||||
|
private readonly IOpenIddictApplicationRepository _openIddictApplicationRepository;
|
||||||
|
private readonly IAbpApplicationManager _applicationManager;
|
||||||
|
private readonly IOpenIddictScopeRepository _openIddictScopeRepository;
|
||||||
|
private readonly IOpenIddictScopeManager _scopeManager;
|
||||||
|
private readonly IPermissionDataSeeder _permissionDataSeeder;
|
||||||
|
private readonly IStringLocalizer<OpenIddictResponse> L;
|
||||||
|
|
||||||
|
public OpenIddictDataSeedContributor(
|
||||||
|
IConfiguration configuration,
|
||||||
|
IOpenIddictApplicationRepository openIddictApplicationRepository,
|
||||||
|
IAbpApplicationManager applicationManager,
|
||||||
|
IOpenIddictScopeRepository openIddictScopeRepository,
|
||||||
|
IOpenIddictScopeManager scopeManager,
|
||||||
|
IPermissionDataSeeder permissionDataSeeder,
|
||||||
|
IStringLocalizer<OpenIddictResponse> l)
|
||||||
|
{
|
||||||
|
_configuration = configuration;
|
||||||
|
_openIddictApplicationRepository = openIddictApplicationRepository;
|
||||||
|
_applicationManager = applicationManager;
|
||||||
|
_openIddictScopeRepository = openIddictScopeRepository;
|
||||||
|
_scopeManager = scopeManager;
|
||||||
|
_permissionDataSeeder = permissionDataSeeder;
|
||||||
|
L = l;
|
||||||
|
}
|
||||||
|
|
||||||
|
[UnitOfWork]
|
||||||
|
public virtual async Task SeedAsync(DataSeedContext context)
|
||||||
|
{
|
||||||
|
await CreateScopesAsync();
|
||||||
|
await CreateApplicationsAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CreateScopesAsync()
|
||||||
|
{
|
||||||
|
if (await _openIddictScopeRepository.FindByNameAsync("AbpProject") == null)
|
||||||
|
{
|
||||||
|
await _scopeManager.CreateAsync(new OpenIddictScopeDescriptor {
|
||||||
|
Name = "AbpProject", DisplayName = "AbpProject API", Resources = { "AbpProject" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CreateApplicationsAsync()
|
||||||
|
{
|
||||||
|
var commonScopes = new List<string> {
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Address,
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Email,
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Phone,
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Profile,
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Roles,
|
||||||
|
"AbpProject"
|
||||||
|
};
|
||||||
|
|
||||||
|
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
|
||||||
|
|
||||||
|
|
||||||
|
//Console Test / Angular Client
|
||||||
|
var consoleAndAngularClientId = configurationSection["AbpProject_App:ClientId"];
|
||||||
|
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
var consoleAndAngularClientRootUrl = configurationSection["AbpProject_App:RootUrl"]?.TrimEnd('/');
|
||||||
|
await CreateApplicationAsync(
|
||||||
|
name: consoleAndAngularClientId!,
|
||||||
|
type: OpenIddictConstants.ClientTypes.Public,
|
||||||
|
consentType: OpenIddictConstants.ConsentTypes.Implicit,
|
||||||
|
displayName: "Console Test / Angular Application",
|
||||||
|
secret: null,
|
||||||
|
grantTypes: new List<string> {
|
||||||
|
OpenIddictConstants.GrantTypes.AuthorizationCode,
|
||||||
|
OpenIddictConstants.GrantTypes.Password,
|
||||||
|
OpenIddictConstants.GrantTypes.ClientCredentials,
|
||||||
|
OpenIddictConstants.GrantTypes.RefreshToken,
|
||||||
|
"LinkLogin",
|
||||||
|
"Impersonation"
|
||||||
|
},
|
||||||
|
scopes: commonScopes,
|
||||||
|
redirectUri: consoleAndAngularClientRootUrl,
|
||||||
|
postLogoutRedirectUri: consoleAndAngularClientRootUrl,
|
||||||
|
clientUri: consoleAndAngularClientRootUrl,
|
||||||
|
logoUri: "/images/clients/angular.svg"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Swagger Client
|
||||||
|
var swaggerClientId = configurationSection["AbpProject_Swagger:ClientId"];
|
||||||
|
if (!swaggerClientId.IsNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
var swaggerRootUrl = configurationSection["AbpProject_Swagger:RootUrl"]?.TrimEnd('/');
|
||||||
|
|
||||||
|
await CreateApplicationAsync(
|
||||||
|
name: swaggerClientId!,
|
||||||
|
type: OpenIddictConstants.ClientTypes.Public,
|
||||||
|
consentType: OpenIddictConstants.ConsentTypes.Implicit,
|
||||||
|
displayName: "Swagger Application",
|
||||||
|
secret: null,
|
||||||
|
grantTypes: new List<string> { OpenIddictConstants.GrantTypes.AuthorizationCode, },
|
||||||
|
scopes: commonScopes,
|
||||||
|
redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
|
||||||
|
clientUri: swaggerRootUrl,
|
||||||
|
logoUri: "/images/clients/swagger.svg"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CreateApplicationAsync(
|
||||||
|
[NotNull] string name,
|
||||||
|
[NotNull] string type,
|
||||||
|
[NotNull] string consentType,
|
||||||
|
string displayName,
|
||||||
|
string? secret,
|
||||||
|
List<string> grantTypes,
|
||||||
|
List<string> scopes,
|
||||||
|
string? redirectUri = null,
|
||||||
|
string? postLogoutRedirectUri = null,
|
||||||
|
List<string>? permissions = null,
|
||||||
|
string? clientUri = null,
|
||||||
|
string? logoUri = null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Public,
|
||||||
|
StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
throw new BusinessException(L["NoClientSecretCanBeSetForPublicApplications"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Confidential,
|
||||||
|
StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
throw new BusinessException(L["TheClientSecretIsRequiredForConfidentialApplications"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var client = await _openIddictApplicationRepository.FindByClientIdAsync(name);
|
||||||
|
|
||||||
|
var application = new AbpApplicationDescriptor {
|
||||||
|
ClientId = name,
|
||||||
|
ClientType = type,
|
||||||
|
ClientSecret = secret,
|
||||||
|
ConsentType = consentType,
|
||||||
|
DisplayName = displayName,
|
||||||
|
ClientUri = clientUri,
|
||||||
|
LogoUri = logoUri,
|
||||||
|
};
|
||||||
|
|
||||||
|
Check.NotNullOrEmpty(grantTypes, nameof(grantTypes));
|
||||||
|
Check.NotNullOrEmpty(scopes, nameof(scopes));
|
||||||
|
|
||||||
|
if (new[] { OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit }.All(
|
||||||
|
grantTypes.Contains))
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdToken);
|
||||||
|
|
||||||
|
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdTokenToken);
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!redirectUri.IsNullOrWhiteSpace() || !postLogoutRedirectUri.IsNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Logout);
|
||||||
|
}
|
||||||
|
|
||||||
|
var buildInGrantTypes = new[] {
|
||||||
|
OpenIddictConstants.GrantTypes.Implicit, OpenIddictConstants.GrantTypes.Password,
|
||||||
|
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.ClientCredentials,
|
||||||
|
OpenIddictConstants.GrantTypes.DeviceCode, OpenIddictConstants.GrantTypes.RefreshToken
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var grantType in grantTypes)
|
||||||
|
{
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode);
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Code);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
|
||||||
|
grantType == OpenIddictConstants.GrantTypes.Implicit)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Authorization);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
|
||||||
|
grantType == OpenIddictConstants.GrantTypes.ClientCredentials ||
|
||||||
|
grantType == OpenIddictConstants.GrantTypes.Password ||
|
||||||
|
grantType == OpenIddictConstants.GrantTypes.RefreshToken ||
|
||||||
|
grantType == OpenIddictConstants.GrantTypes.DeviceCode)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Token);
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Revocation);
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Introspection);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Implicit);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.Password)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Password);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.RefreshToken)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.RefreshToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.DeviceCode)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.DeviceCode);
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Device);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdToken);
|
||||||
|
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdTokenToken);
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!buildInGrantTypes.Contains(grantType))
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.GrantType + grantType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var buildInScopes = new[] {
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Address, OpenIddictConstants.Permissions.Scopes.Email,
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Phone, OpenIddictConstants.Permissions.Scopes.Profile,
|
||||||
|
OpenIddictConstants.Permissions.Scopes.Roles
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var scope in scopes)
|
||||||
|
{
|
||||||
|
if (buildInScopes.Contains(scope))
|
||||||
|
{
|
||||||
|
application.Permissions.Add(scope);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.Scope + scope);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (redirectUri != null)
|
||||||
|
{
|
||||||
|
if (!redirectUri.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
if (!Uri.TryCreate(redirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
|
||||||
|
{
|
||||||
|
throw new BusinessException(L["InvalidRedirectUri", redirectUri]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (application.RedirectUris.All(x => x != uri))
|
||||||
|
{
|
||||||
|
application.RedirectUris.Add(uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (postLogoutRedirectUri != null)
|
||||||
|
{
|
||||||
|
if (!postLogoutRedirectUri.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
if (!Uri.TryCreate(postLogoutRedirectUri, UriKind.Absolute, out var uri) ||
|
||||||
|
!uri.IsWellFormedOriginalString())
|
||||||
|
{
|
||||||
|
throw new BusinessException(L["InvalidPostLogoutRedirectUri", postLogoutRedirectUri]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (application.PostLogoutRedirectUris.All(x => x != uri))
|
||||||
|
{
|
||||||
|
application.PostLogoutRedirectUris.Add(uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissions != null)
|
||||||
|
{
|
||||||
|
await _permissionDataSeeder.SeedAsync(
|
||||||
|
ClientPermissionValueProvider.ProviderName,
|
||||||
|
name,
|
||||||
|
permissions,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (client == null)
|
||||||
|
{
|
||||||
|
await _applicationManager.CreateAsync(application);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!HasSameRedirectUris(client, application))
|
||||||
|
{
|
||||||
|
client.RedirectUris = JsonSerializer.Serialize(application.RedirectUris.Select(q => q.ToString().RemovePostFix("/")));
|
||||||
|
client.PostLogoutRedirectUris = JsonSerializer.Serialize(application.PostLogoutRedirectUris.Select(q => q.ToString().RemovePostFix("/")));
|
||||||
|
|
||||||
|
await _applicationManager.UpdateAsync(client.ToModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!HasSameScopes(client, application))
|
||||||
|
{
|
||||||
|
client.Permissions = JsonSerializer.Serialize(application.Permissions.Select(q => q.ToString()));
|
||||||
|
await _applicationManager.UpdateAsync(client.ToModel());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool HasSameRedirectUris(OpenIddictApplication existingClient, AbpApplicationDescriptor application)
|
||||||
|
{
|
||||||
|
return existingClient.RedirectUris == JsonSerializer.Serialize(application.RedirectUris.Select(q => q.ToString().RemovePostFix("/")));
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool HasSameScopes(OpenIddictApplication existingClient, AbpApplicationDescriptor application)
|
||||||
|
{
|
||||||
|
return existingClient.Permissions == JsonSerializer.Serialize(application.Permissions.Select(q => q.ToString().TrimEnd('/')));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using Skcks.Study.AbpProject.Categories;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Products;
|
||||||
|
|
||||||
|
public class Product:FullAuditedAggregateRoot<Guid>
|
||||||
|
{
|
||||||
|
public Category Category { get; set; }
|
||||||
|
public Guid CategoryId { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public float Price { get; set; }
|
||||||
|
public bool IsFreeCargo { get; set; }
|
||||||
|
public DateTime ReleaseDate { get; set; }
|
||||||
|
public ProductStockState StockState { get; set; }
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
[assembly:InternalsVisibleToAttribute("Skcks.Study.AbpProject.Domain.Tests")]
|
||||||
|
[assembly:InternalsVisibleToAttribute("Skcks.Study.AbpProject.TestBase")]
|
@ -0,0 +1,12 @@
|
|||||||
|
using Volo.Abp.Settings;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Settings;
|
||||||
|
|
||||||
|
public class AbpProjectSettingDefinitionProvider : SettingDefinitionProvider
|
||||||
|
{
|
||||||
|
public override void Define(ISettingDefinitionContext context)
|
||||||
|
{
|
||||||
|
//Define your own settings here. Example:
|
||||||
|
//context.Add(new SettingDefinition(AbpProjectSettings.MySetting1));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace Skcks.Study.AbpProject.Settings;
|
||||||
|
|
||||||
|
public static class AbpProjectSettings
|
||||||
|
{
|
||||||
|
private const string Prefix = "AbpProject";
|
||||||
|
|
||||||
|
//Add your own setting names here. Example:
|
||||||
|
//public const string MySetting1 = Prefix + ".MySetting1";
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"role": "lib.domain"
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Skcks.Study.AbpProject</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Domain.Shared\Skcks.Study.AbpProject.Domain.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Emailing" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Caching" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.BlobStoring.Database.Domain" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.OpenIddict.Domain" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Identity.Domain" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,122 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Skcks.Study.AbpProject.Categories;
|
||||||
|
using Skcks.Study.AbpProject.Products;
|
||||||
|
using Volo.Abp.AuditLogging.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.Data;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.EntityFrameworkCore.Modeling;
|
||||||
|
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.Identity.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.SettingManagement.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.OpenIddict.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
using Volo.Abp.TenantManagement.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.EntityFrameworkCore;
|
||||||
|
|
||||||
|
[ReplaceDbContext(typeof(IIdentityDbContext))]
|
||||||
|
[ReplaceDbContext(typeof(ITenantManagementDbContext))]
|
||||||
|
[ConnectionStringName("Default")]
|
||||||
|
public class AbpProjectDbContext :
|
||||||
|
AbpDbContext<AbpProjectDbContext>,
|
||||||
|
ITenantManagementDbContext,
|
||||||
|
IIdentityDbContext
|
||||||
|
{
|
||||||
|
/* Add DbSet properties for your Aggregate Roots / Entities here. */
|
||||||
|
|
||||||
|
|
||||||
|
#region Entities from the modules
|
||||||
|
|
||||||
|
/* Notice: We only implemented IIdentityProDbContext and ISaasDbContext
|
||||||
|
* and replaced them for this DbContext. This allows you to perform JOIN
|
||||||
|
* queries for the entities of these modules over the repositories easily. You
|
||||||
|
* typically don't need that for other modules. But, if you need, you can
|
||||||
|
* implement the DbContext interface of the needed module and use ReplaceDbContext
|
||||||
|
* attribute just like IIdentityProDbContext and ISaasDbContext.
|
||||||
|
*
|
||||||
|
* More info: Replacing a DbContext of a module ensures that the related module
|
||||||
|
* uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Identity
|
||||||
|
public DbSet<IdentityUser> Users { get; set; }
|
||||||
|
public DbSet<IdentityRole> Roles { get; set; }
|
||||||
|
public DbSet<IdentityClaimType> ClaimTypes { get; set; }
|
||||||
|
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
|
||||||
|
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
|
||||||
|
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
|
||||||
|
public DbSet<IdentityUserDelegation> UserDelegations { get; set; }
|
||||||
|
public DbSet<IdentitySession> Sessions { get; set; }
|
||||||
|
|
||||||
|
// Tenant Management
|
||||||
|
public DbSet<Tenant> Tenants { get; set; }
|
||||||
|
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public DbSet<Product> Products { get; set; }
|
||||||
|
public DbSet<Category> Categories { get; set; }
|
||||||
|
|
||||||
|
public AbpProjectDbContext(DbContextOptions<AbpProjectDbContext> options)
|
||||||
|
: base(options)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
|
{
|
||||||
|
base.OnModelCreating(builder);
|
||||||
|
|
||||||
|
/* Include modules to your migration db context */
|
||||||
|
|
||||||
|
builder.ConfigurePermissionManagement();
|
||||||
|
builder.ConfigureSettingManagement();
|
||||||
|
builder.ConfigureBackgroundJobs();
|
||||||
|
builder.ConfigureAuditLogging();
|
||||||
|
builder.ConfigureFeatureManagement();
|
||||||
|
builder.ConfigureIdentity();
|
||||||
|
builder.ConfigureOpenIddict();
|
||||||
|
builder.ConfigureTenantManagement();
|
||||||
|
builder.ConfigureBlobStoring();
|
||||||
|
|
||||||
|
/* Configure your own tables/entities inside here */
|
||||||
|
|
||||||
|
//builder.Entity<YourEntity>(b =>
|
||||||
|
//{
|
||||||
|
// b.ToTable(AbpProjectConsts.DbTablePrefix + "YourEntities", AbpProjectConsts.DbSchema);
|
||||||
|
// b.ConfigureByConvention(); //auto configure for the base class props
|
||||||
|
// //...
|
||||||
|
//});
|
||||||
|
builder.Entity<Category>(b =>
|
||||||
|
{
|
||||||
|
// 表名
|
||||||
|
b.ToTable("Categories");
|
||||||
|
// 约束
|
||||||
|
b.Property(x => x.Name)
|
||||||
|
.HasMaxLength(CategoryConsts.MaxNameLength)
|
||||||
|
.IsRequired();
|
||||||
|
// 索引
|
||||||
|
b.HasIndex(x => x.Name);
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Entity<Product>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable("Products");
|
||||||
|
b.Property(x => x.Name)
|
||||||
|
.HasMaxLength(ProductConsts.MaxNameLength)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne(x=>x.Category)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey(x=>x.CategoryId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
b.HasIndex(x=>x.Name).IsUnique();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Design;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.EntityFrameworkCore;
|
||||||
|
|
||||||
|
/* This class is needed for EF Core console commands
|
||||||
|
* (like Add-Migration and Update-Database commands) */
|
||||||
|
public class AbpProjectDbContextFactory : IDesignTimeDbContextFactory<AbpProjectDbContext>
|
||||||
|
{
|
||||||
|
public AbpProjectDbContext CreateDbContext(string[] args)
|
||||||
|
{
|
||||||
|
var configuration = BuildConfiguration();
|
||||||
|
|
||||||
|
AbpProjectEfCoreEntityExtensionMappings.Configure();
|
||||||
|
|
||||||
|
var builder = new DbContextOptionsBuilder<AbpProjectDbContext>()
|
||||||
|
.UseSqlServer(configuration.GetConnectionString("Default"));
|
||||||
|
|
||||||
|
return new AbpProjectDbContext(builder.Options);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IConfigurationRoot BuildConfiguration()
|
||||||
|
{
|
||||||
|
var builder = new ConfigurationBuilder()
|
||||||
|
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../Skcks.Study.AbpProject.DbMigrator/"))
|
||||||
|
.AddJsonFile("appsettings.json", optional: false);
|
||||||
|
|
||||||
|
return builder.Build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.ObjectExtending;
|
||||||
|
using Volo.Abp.Threading;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.EntityFrameworkCore;
|
||||||
|
|
||||||
|
public static class AbpProjectEfCoreEntityExtensionMappings
|
||||||
|
{
|
||||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
||||||
|
|
||||||
|
public static void Configure()
|
||||||
|
{
|
||||||
|
AbpProjectGlobalFeatureConfigurator.Configure();
|
||||||
|
AbpProjectModuleExtensionConfigurator.Configure();
|
||||||
|
|
||||||
|
OneTimeRunner.Run(() =>
|
||||||
|
{
|
||||||
|
/* You can configure extra properties for the
|
||||||
|
* entities defined in the modules used by your application.
|
||||||
|
*
|
||||||
|
* This class can be used to map these extra properties to table fields in the database.
|
||||||
|
*
|
||||||
|
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
|
||||||
|
* USE AbpProjectModuleExtensionConfigurator CLASS (in the Domain.Shared project)
|
||||||
|
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
|
||||||
|
*
|
||||||
|
* Example: Map a property to a table field:
|
||||||
|
|
||||||
|
ObjectExtensionManager.Instance
|
||||||
|
.MapEfCoreProperty<IdentityUser, string>(
|
||||||
|
"MyProperty",
|
||||||
|
(entityBuilder, propertyBuilder) =>
|
||||||
|
{
|
||||||
|
propertyBuilder.HasMaxLength(128);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
* See the documentation for more:
|
||||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||||
|
*/
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Volo.Abp.Uow;
|
||||||
|
using Volo.Abp.AuditLogging.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.EntityFrameworkCore.SqlServer;
|
||||||
|
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.Identity.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.OpenIddict.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.SettingManagement.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
|
||||||
|
using Volo.Abp.TenantManagement.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.EntityFrameworkCore;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpProjectDomainModule),
|
||||||
|
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpSettingManagementEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpEntityFrameworkCoreSqlServerModule),
|
||||||
|
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpIdentityEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpOpenIddictEntityFrameworkCoreModule),
|
||||||
|
typeof(AbpTenantManagementEntityFrameworkCoreModule),
|
||||||
|
typeof(BlobStoringDatabaseEntityFrameworkCoreModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectEntityFrameworkCoreModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
|
||||||
|
AbpProjectEfCoreEntityExtensionMappings.Configure();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
context.Services.AddAbpDbContext<AbpProjectDbContext>(options =>
|
||||||
|
{
|
||||||
|
/* Remove "includeAllEntities: true" to create
|
||||||
|
* default repositories only for aggregate roots */
|
||||||
|
options.AddDefaultRepositories(includeAllEntities: true);
|
||||||
|
});
|
||||||
|
|
||||||
|
Configure<AbpDbContextOptions>(options =>
|
||||||
|
{
|
||||||
|
/* The main point to change your DBMS.
|
||||||
|
* See also AbpProjectDbContextFactory for EF Core tooling. */
|
||||||
|
options.UseSqlServer();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Skcks.Study.AbpProject.Data;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.EntityFrameworkCore;
|
||||||
|
|
||||||
|
public class EntityFrameworkCoreAbpProjectDbSchemaMigrator
|
||||||
|
: IAbpProjectDbSchemaMigrator, ITransientDependency
|
||||||
|
{
|
||||||
|
private readonly IServiceProvider _serviceProvider;
|
||||||
|
|
||||||
|
public EntityFrameworkCoreAbpProjectDbSchemaMigrator(IServiceProvider serviceProvider)
|
||||||
|
{
|
||||||
|
_serviceProvider = serviceProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task MigrateAsync()
|
||||||
|
{
|
||||||
|
/* We intentionally resolving the AbpProjectDbContext
|
||||||
|
* from IServiceProvider (instead of directly injecting it)
|
||||||
|
* to properly get the connection string of the current tenant in the
|
||||||
|
* current scope.
|
||||||
|
*/
|
||||||
|
|
||||||
|
await _serviceProvider
|
||||||
|
.GetRequiredService<AbpProjectDbContext>()
|
||||||
|
.Database
|
||||||
|
.MigrateAsync();
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,91 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Categories_And_Products : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Categories",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Categories", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Products",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
|
Price = table.Column<float>(type: "real", nullable: false),
|
||||||
|
IsFreeCargo = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
ReleaseDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
StockState = table.Column<byte>(type: "tinyint", nullable: false),
|
||||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Products", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Products_Categories_CategoryId",
|
||||||
|
column: x => x.CategoryId,
|
||||||
|
principalTable: "Categories",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Categories_Name",
|
||||||
|
table: "Categories",
|
||||||
|
column: "Name");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Products_CategoryId",
|
||||||
|
table: "Products",
|
||||||
|
column: "CategoryId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Products_Name",
|
||||||
|
table: "Products",
|
||||||
|
column: "Name",
|
||||||
|
unique: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Products");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Categories");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
[assembly:InternalsVisibleToAttribute("Skcks.Study.AbpProject.EntityFrameworkCore.Tests")]
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"role": "lib.ef"
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Skcks.Study.AbpProject</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Domain\Skcks.Study.AbpProject.Domain.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,38 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Volo.Abp.Account;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.PermissionManagement;
|
||||||
|
using Volo.Abp.SettingManagement;
|
||||||
|
using Volo.Abp.VirtualFileSystem;
|
||||||
|
using Volo.Abp.FeatureManagement;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpProjectApplicationContractsModule),
|
||||||
|
typeof(AbpPermissionManagementHttpApiClientModule),
|
||||||
|
typeof(AbpFeatureManagementHttpApiClientModule),
|
||||||
|
typeof(AbpAccountHttpApiClientModule),
|
||||||
|
typeof(AbpIdentityHttpApiClientModule),
|
||||||
|
typeof(AbpTenantManagementHttpApiClientModule),
|
||||||
|
typeof(AbpSettingManagementHttpApiClientModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectHttpApiClientModule : AbpModule
|
||||||
|
{
|
||||||
|
public const string RemoteServiceName = "Default";
|
||||||
|
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
context.Services.AddHttpClientProxies(
|
||||||
|
typeof(AbpProjectApplicationContractsModule).Assembly,
|
||||||
|
RemoteServiceName
|
||||||
|
);
|
||||||
|
|
||||||
|
Configure<AbpVirtualFileSystemOptions>(options =>
|
||||||
|
{
|
||||||
|
options.FileSets.AddEmbedded<AbpProjectHttpApiClientModule>();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"role": "lib.http-api-client"
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Skcks.Study.AbpProject</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Skcks.Study.AbpProject.Application.Contracts\Skcks.Study.AbpProject.Application.Contracts.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.SettingManagement.HttpApi.Client" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="8.3.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="8.3.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="**\*generate-proxy.json" />
|
||||||
|
<Content Remove="**\*generate-proxy.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,41 @@
|
|||||||
|
using Localization.Resources.AbpUi;
|
||||||
|
using Skcks.Study.AbpProject.Localization;
|
||||||
|
using Volo.Abp.Account;
|
||||||
|
using Volo.Abp.SettingManagement;
|
||||||
|
using Volo.Abp.FeatureManagement;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Volo.Abp.PermissionManagement.HttpApi;
|
||||||
|
using Volo.Abp.Localization;
|
||||||
|
using Volo.Abp.TenantManagement;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject;
|
||||||
|
|
||||||
|
[DependsOn(
|
||||||
|
typeof(AbpProjectApplicationContractsModule),
|
||||||
|
typeof(AbpPermissionManagementHttpApiModule),
|
||||||
|
typeof(AbpSettingManagementHttpApiModule),
|
||||||
|
typeof(AbpAccountHttpApiModule),
|
||||||
|
typeof(AbpIdentityHttpApiModule),
|
||||||
|
typeof(AbpTenantManagementHttpApiModule),
|
||||||
|
typeof(AbpFeatureManagementHttpApiModule)
|
||||||
|
)]
|
||||||
|
public class AbpProjectHttpApiModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
ConfigureLocalization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ConfigureLocalization()
|
||||||
|
{
|
||||||
|
Configure<AbpLocalizationOptions>(options =>
|
||||||
|
{
|
||||||
|
options.Resources
|
||||||
|
.Get<AbpProjectResource>()
|
||||||
|
.AddBaseTypes(
|
||||||
|
typeof(AbpUiResource)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using Skcks.Study.AbpProject.Localization;
|
||||||
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Controllers;
|
||||||
|
|
||||||
|
/* Inherit your controllers from this class.
|
||||||
|
*/
|
||||||
|
public abstract class AbpProjectController : AbpControllerBase
|
||||||
|
{
|
||||||
|
protected AbpProjectController()
|
||||||
|
{
|
||||||
|
LocalizationResource = typeof(AbpProjectResource);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Skcks.Study.AbpProject.Models.Test;
|
||||||
|
|
||||||
|
public class TestModel
|
||||||
|
{
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
public DateTime BirthDate { get; set; }
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user