Browse Source

moved bookstore-angular-mongodb sample

pull/3507/head
Akın Sabri Çam 6 years ago
parent
commit
b1cfe77dea
  1. 2
      docs/pt-BR/Tutorials/Angular/Part-I.md
  2. 2
      docs/pt-BR/Tutorials/Angular/Part-II.md
  3. 2
      docs/pt-BR/Tutorials/Angular/Part-III.md
  4. 13
      samples/BookStore-Angular-MongoDb/angular/.editorconfig
  5. 48
      samples/BookStore-Angular-MongoDb/angular/.gitignore
  6. 27
      samples/BookStore-Angular-MongoDb/angular/README.md
  7. 157
      samples/BookStore-Angular-MongoDb/angular/angular.json
  8. 12
      samples/BookStore-Angular-MongoDb/angular/browserslist
  9. 32
      samples/BookStore-Angular-MongoDb/angular/e2e/protractor.conf.js
  10. 23
      samples/BookStore-Angular-MongoDb/angular/e2e/src/app.e2e-spec.ts
  11. 11
      samples/BookStore-Angular-MongoDb/angular/e2e/src/app.po.ts
  12. 13
      samples/BookStore-Angular-MongoDb/angular/e2e/tsconfig.json
  13. 32
      samples/BookStore-Angular-MongoDb/angular/karma.conf.js
  14. 58
      samples/BookStore-Angular-MongoDb/angular/package.json
  15. 61
      samples/BookStore-Angular-MongoDb/angular/src/app/app-routing.module.ts
  16. 68
      samples/BookStore-Angular-MongoDb/angular/src/app/app.component.spec.ts
  17. 31
      samples/BookStore-Angular-MongoDb/angular/src/app/app.component.ts
  18. 44
      samples/BookStore-Angular-MongoDb/angular/src/app/app.module.ts
  19. 140
      samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.html
  20. 0
      samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.scss
  21. 25
      samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.spec.ts
  22. 109
      samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.ts
  23. 19
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books-routing.module.ts
  24. 1
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.html
  25. 0
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.scss
  26. 25
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.spec.ts
  27. 15
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.ts
  28. 14
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.module.ts
  29. 12
      samples/BookStore-Angular-MongoDb/angular/src/app/books/shared/books.service.spec.ts
  30. 51
      samples/BookStore-Angular-MongoDb/angular/src/app/books/shared/books.service.ts
  31. 18
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home-routing.module.ts
  32. 20
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.html
  33. 51
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.spec.ts
  34. 14
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.ts
  35. 10
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.module.ts
  36. 7
      samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/account-wrapper.module.ts
  37. 7
      samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/identity-wrapper.module.ts
  38. 7
      samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/setting-management-wrapper.module.ts
  39. 7
      samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/tenant-management-wrapper.module.ts
  40. 29
      samples/BookStore-Angular-MongoDb/angular/src/app/shared/shared.module.ts
  41. 18
      samples/BookStore-Angular-MongoDb/angular/src/app/store/actions/books.actions.ts
  42. 1
      samples/BookStore-Angular-MongoDb/angular/src/app/store/actions/index.ts
  43. 41
      samples/BookStore-Angular-MongoDb/angular/src/app/store/models/books.ts
  44. 1
      samples/BookStore-Angular-MongoDb/angular/src/app/store/models/index.ts
  45. 47
      samples/BookStore-Angular-MongoDb/angular/src/app/store/states/books.state.ts
  46. 1
      samples/BookStore-Angular-MongoDb/angular/src/app/store/states/index.ts
  47. 0
      samples/BookStore-Angular-MongoDb/angular/src/assets/.gitkeep
  48. 25
      samples/BookStore-Angular-MongoDb/angular/src/environments/environment.hmr.ts
  49. 25
      samples/BookStore-Angular-MongoDb/angular/src/environments/environment.prod.ts
  50. 25
      samples/BookStore-Angular-MongoDb/angular/src/environments/environment.ts
  51. BIN
      samples/BookStore-Angular-MongoDb/angular/src/favicon.ico
  52. 16
      samples/BookStore-Angular-MongoDb/angular/src/index.html
  53. 20
      samples/BookStore-Angular-MongoDb/angular/src/main.ts
  54. 63
      samples/BookStore-Angular-MongoDb/angular/src/polyfills.ts
  55. 26
      samples/BookStore-Angular-MongoDb/angular/src/styles.scss
  56. 20
      samples/BookStore-Angular-MongoDb/angular/src/test.ts
  57. 9
      samples/BookStore-Angular-MongoDb/angular/tsconfig.app.json
  58. 23
      samples/BookStore-Angular-MongoDb/angular/tsconfig.json
  59. 18
      samples/BookStore-Angular-MongoDb/angular/tsconfig.spec.json
  60. 92
      samples/BookStore-Angular-MongoDb/angular/tslint.json
  61. 1
      samples/BookStore-Angular-MongoDb/aspnet-core/.gitattributes
  62. 259
      samples/BookStore-Angular-MongoDb/aspnet-core/.gitignore
  63. 123
      samples/BookStore-Angular-MongoDb/aspnet-core/Acme.BookStore.sln
  64. 23
      samples/BookStore-Angular-MongoDb/aspnet-core/Acme.BookStore.sln.DotSettings
  65. 7
      samples/BookStore-Angular-MongoDb/aspnet-core/common.props
  66. 22
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
  67. 16
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/BookDto.cs
  68. 22
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs
  69. 21
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/CreateUpdateBookDto.cs
  70. 17
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/IBookAppService.cs
  71. 22
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs
  72. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs
  73. 23
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
  74. 18
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookStoreAppService.cs
  75. 16
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs
  76. 30
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookStoreApplicationModule.cs
  77. 19
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/IBookAppService.cs
  78. 34
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj
  79. 20
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs
  80. 34
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs
  81. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Logs/logs.txt
  82. 38
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Program.cs
  83. 18
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/appsettings.json
  84. 1
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/tempkey.rsa
  85. 26
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj
  86. 7
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookStoreDomainErrorCodes.cs
  87. 45
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs
  88. 15
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookType.cs
  89. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/cs.json
  90. 20
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json
  91. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pl.json
  92. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pt-BR.json
  93. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/tr.json
  94. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/vi.json
  95. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json
  96. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hant.json
  97. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStoreResource.cs
  98. 11
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
  99. 27
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj
  100. 30
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Book.cs

2
docs/pt-BR/Tutorials/Angular/Part-I.md

@ -10,7 +10,7 @@ Esta é a primeira parte da série de tutoriais angulares. Veja todas as peças:
- [Parte II: Criar, atualizar e excluir livros](Part-II)
- [Parte III: Testes de Integração](Part-III)
Você pode acessar o **código fonte** do aplicativo no [repositório GitHub](https://github.com/abpframework/abp/tree/dev/samples/BookStore-Angular-MongoDb) .
Você pode acessar o **código fonte** do aplicativo no [repositório GitHub](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) .
### Criando o projeto

2
docs/pt-BR/Tutorials/Angular/Part-II.md

@ -8,7 +8,7 @@ Esta é a segunda parte da série de tutoriais angulares. Veja todas as peças:
- **Parte II: Criar, atualizar e excluir livros (este tutorial)**
- [Parte III: Testes de Integração](Part-III.md)
Você pode acessar o **código fonte** do aplicativo no [repositório GitHub](https://github.com/abpframework/abp/tree/dev/samples/BookStore-Angular-MongoDb) .
Você pode acessar o **código fonte** do aplicativo no [repositório GitHub](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) .
### Criando um novo livro

2
docs/pt-BR/Tutorials/Angular/Part-III.md

@ -8,7 +8,7 @@ Esta é a terceira parte da série de tutoriais Angular. Veja todas as peças:
- [Parte II: Criar, atualizar e excluir livros](Part-II.md)
- **Parte III: Testes de Integração (este tutorial)**
Esta parte abrange os testes do **lado** do **servidor** . Você pode acessar o **código fonte** do aplicativo no [repositório GitHub](https://github.com/abpframework/abp/tree/dev/samples/BookStore-Angular-MongoDb) .
Esta parte abrange os testes do **lado** do **servidor** . Você pode acessar o **código fonte** do aplicativo no [repositório GitHub](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) .
### Testar projetos na solução

13
samples/BookStore-Angular-MongoDb/angular/.editorconfig

@ -1,13 +0,0 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

48
samples/BookStore-Angular-MongoDb/angular/.gitignore

@ -1,48 +0,0 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
yarn.lock*

27
samples/BookStore-Angular-MongoDb/angular/README.md

@ -1,27 +0,0 @@
# BookStore
This is a startup project based on the ABP framework. For more information, visit <a href="https://abp.io/" target="_blank">abp.io</a>
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

157
samples/BookStore-Angular-MongoDb/angular/angular.json

@ -1,157 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"bookStore": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/bookStore",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"extractCss": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
{
"input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"lazy": true,
"bundleName": "fontawesome-all.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"lazy": true,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/primeng/resources/themes/nova-light/theme.css",
"lazy": true,
"bundleName": "primeng-nova-light-theme"
},
{
"input": "node_modules/primeicons/primeicons.css",
"lazy": true,
"bundleName": "primeicons"
},
{
"input": "node_modules/primeng/resources/primeng.min.css",
"lazy": true,
"bundleName": "primeng.min"
}
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"hmr": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "bookStore:build"
},
"configurations": {
"production": {
"browserTarget": "bookStore:build:production"
},
"hmr": {
"hmr": true,
"browserTarget": "bookStore:build:hmr"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "bookStore:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/font-awesome/css/font-awesome.min.css",
"node_modules/primeng/resources/themes/nova-light/theme.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/primeng.min.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"exclude": ["**/node_modules/**"]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "bookStore:serve"
},
"configurations": {
"production": {
"devServerTarget": "bookStore:serve:production"
}
}
}
}
}
},
"defaultProject": "bookStore"
}

12
samples/BookStore-Angular-MongoDb/angular/browserslist

@ -1,12 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

32
samples/BookStore-Angular-MongoDb/angular/e2e/protractor.conf.js

@ -1,32 +0,0 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};

23
samples/BookStore-Angular-MongoDb/angular/e2e/src/app.e2e-spec.ts

@ -1,23 +0,0 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to bookStore!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});

11
samples/BookStore-Angular-MongoDb/angular/e2e/src/app.po.ts

@ -1,11 +0,0 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}

13
samples/BookStore-Angular-MongoDb/angular/e2e/tsconfig.json

@ -1,13 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}

32
samples/BookStore-Angular-MongoDb/angular/karma.conf.js

@ -1,32 +0,0 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/bookStore'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

58
samples/BookStore-Angular-MongoDb/angular/package.json

@ -1,58 +0,0 @@
{
"name": "BookStore",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start:hmr": "ng serve --configuration hmr",
"build": "ng build",
"build:prod": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@abp/ng.account": "~2.2.0",
"@abp/ng.identity": "~2.2.0",
"@abp/ng.setting-management": "~2.2.0",
"@abp/ng.tenant-management": "~2.2.0",
"@abp/ng.theme.basic": "~2.2.0",
"@angular/animations": "~8.2.14",
"@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/forms": "~8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.20",
"@angular/cli": "~8.3.20",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@angularclass/hmr": "^2.1.3",
"@ngxs/hmr-plugin": "^3.5.1",
"@ngxs/logger-plugin": "^3.5.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"ngxs-schematic": "^1.1.9",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
}
}

61
samples/BookStore-Angular-MongoDb/angular/src/app/app-routing.module.ts

@ -1,61 +0,0 @@
import { ABP } from "@abp/ng.core";
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { ApplicationLayoutComponent } from "@abp/ng.theme.basic";
const routes: Routes = [
{
path: "",
loadChildren: () => import("./home/home.module").then(m => m.HomeModule),
data: {
routes: {
name: "::Menu:Home"
} as ABP.Route
}
},
{
path: "account",
loadChildren: () =>
import("./lazy-libs/account-wrapper.module").then(
m => m.AccountWrapperModule
)
},
{
path: "identity",
loadChildren: () =>
import("./lazy-libs/identity-wrapper.module").then(
m => m.IdentityWrapperModule
)
},
{
path: "tenant-management",
loadChildren: () =>
import("./lazy-libs/tenant-management-wrapper.module").then(
m => m.TenantManagementWrapperModule
)
},
{
path: "setting-management",
loadChildren: () =>
import("./lazy-libs/setting-management-wrapper.module").then(
m => m.SettingManagementWrapperModule
)
},
{
path: "books",
component: ApplicationLayoutComponent,
loadChildren: () => import("./books/books.module").then(m => m.BooksModule),
data: {
routes: {
name: "::Menu:Books",
iconClass: "fas fa-book"
} as ABP.Route
}
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {}

68
samples/BookStore-Angular-MongoDb/angular/src/app/app.component.spec.ts

@ -1,68 +0,0 @@
import { LazyLoadService } from '@abp/ng.core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { NgxsModule } from '@ngxs/store';
import { OAuthService } from 'angular-oauth2-oidc';
import { AppComponent } from './app.component';
import { LoaderBarComponent } from '@abp/ng.theme.shared';
import { Subject, Observable } from 'rxjs';
import { Component } from '@angular/core';
import { By } from '@angular/platform-browser';
@Component({
template: '',
selector: 'abp-loader-bar',
})
class DummyLoaderBarComponent {}
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
let mockLazyLoadService: { load: () => Observable<void> };
let loadResponse$: Subject<void>;
let spy: jasmine.Spy<() => Observable<void>>;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent, DummyLoaderBarComponent],
providers: [{ provide: LazyLoadService, useValue: { load: () => loadResponse$ } }],
});
loadResponse$ = new Subject();
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
mockLazyLoadService = TestBed.get(LazyLoadService);
spy = spyOn(mockLazyLoadService, 'load');
spy.and.returnValue(loadResponse$);
fixture.detectChanges();
});
describe('LazyLoadService load method', () => {
it('should call', () => {
expect(spy).toHaveBeenCalledWith(
[
'primeng.min.css',
'primeicons.css',
'primeng-nova-light-theme.css',
'fontawesome-all.min.css',
'fontawesome-v4-shims.min.css',
],
'style',
null,
'head',
);
});
});
describe('template', () => {
it('should have the abp-loader-bar', () => {
const abpLoader = fixture.debugElement.query(By.css('abp-loader-bar'));
expect(abpLoader).toBeTruthy();
});
it('should have router-outlet', () => {
const abpLoader = fixture.debugElement.query(By.css('router-outlet'));
expect(abpLoader).toBeTruthy();
});
});
});

31
samples/BookStore-Angular-MongoDb/angular/src/app/app.component.ts

@ -1,31 +0,0 @@
import { LazyLoadService } from '@abp/ng.core';
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<abp-loader-bar></abp-loader-bar>
<router-outlet></router-outlet>
`,
})
export class AppComponent implements OnInit {
constructor(private lazyLoadService: LazyLoadService) {}
ngOnInit() {
this.lazyLoadService
.load(
[
'primeng.min.css',
'primeicons.css',
'primeng-nova-light-theme.css',
'fontawesome-all.min.css',
'fontawesome-v4-shims.min.css',
],
'style',
null,
'head',
'afterbegin',
)
.subscribe();
}
}

44
samples/BookStore-Angular-MongoDb/angular/src/app/app.module.ts

@ -1,44 +0,0 @@
import { AccountConfigModule } from '@abp/ng.account.config';
import { CoreModule } from '@abp/ng.core';
import { IdentityConfigModule } from '@abp/ng.identity.config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management.config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management.config';
import { LAYOUTS } from '@abp/ng.theme.basic';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsModule } from '@ngxs/store';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { BooksState } from './store/states/books.state';
const LOGGERS = [NgxsLoggerPluginModule.forRoot({ disabled: false })];
@NgModule({
imports: [
CoreModule.forRoot({
environment,
requirements: {
layouts: LAYOUTS,
},
}),
ThemeSharedModule.forRoot(),
AccountConfigModule.forRoot({ redirectUrl: '/' }),
IdentityConfigModule,
TenantManagementConfigModule,
SettingManagementConfigModule,
NgxsModule.forRoot([BooksState]),
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
SharedModule,
...(environment.production ? [] : LOGGERS),
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule {}

140
samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.html

@ -1,140 +0,0 @@
<div class="card">
<div class="card-header">
<div class="row">
<div class="col col-md-6">
<h5 class="card-title">
{{ "::Menu:Books" | abpLocalization }}
</h5>
</div>
<div class="text-right col col-md-6">
<div class="text-lg-right pt-2">
<button
id="create"
class="btn btn-primary"
type="button"
(click)="createBook()"
>
<i class="fa fa-plus mr-1"></i>
<span>{{ "::NewBook" | abpLocalization }}</span>
</button>
</div>
</div>
</div>
</div>
<div class="card-body">
<abp-table
[value]="books$ | async"
[abpLoading]="loading"
[headerTemplate]="tableHeader"
[bodyTemplate]="tableBody"
[rows]="10"
[scrollable]="true"
>
</abp-table>
<ng-template #tableHeader>
<tr>
<th>{{ "::Actions" | abpLocalization }}</th>
<th>{{ "::Name" | abpLocalization }}</th>
<th>{{ "::Type" | abpLocalization }}</th>
<th>{{ "::PublishDate" | abpLocalization }}</th>
<th>{{ "::Price" | abpLocalization }}</th>
</tr>
</ng-template>
<ng-template #tableBody let-data>
<tr>
<td>
<div ngbDropdown container="body" class="d-inline-block">
<button
class="btn btn-primary btn-sm dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
ngbDropdownToggle
>
<i class="fa fa-cog mr-1"></i>{{ "::Actions" | abpLocalization }}
</button>
<div ngbDropdownMenu>
<button ngbDropdownItem (click)="editBook(data.id)">
{{ "::Edit" | abpLocalization }}
</button>
<button ngbDropdownItem (click)="delete(data.id, data.name)">
{{ "AbpAccount::Delete" | abpLocalization }}
</button>
</div>
</div>
</td>
<td>{{ data.name }}</td>
<td>{{ booksType[data.type] }}</td>
<td>{{ data.publishDate | date }}</td>
<td>{{ data.price }}</td>
</tr>
</ng-template>
</div>
</div>
<abp-modal [(visible)]="isModalOpen">
<ng-template #abpHeader>
<h3>
{{
(selectedBook.id ? "AbpIdentity::Edit" : "::NewBook") | abpLocalization
}}
</h3>
</ng-template>
<ng-template #abpBody>
<form [formGroup]="form">
<div class="form-group">
<label for="book-name">Name</label><span> * </span>
<input
type="text"
id="book-name"
class="form-control"
formControlName="name"
autofocus
/>
</div>
<div class="form-group">
<label for="book-price">Price</label><span> * </span>
<input
type="number"
id="book-price"
class="form-control"
formControlName="price"
/>
</div>
<div class="form-group">
<label for="book-type">Type</label><span> * </span>
<select class="form-control" id="book-type" formControlName="type">
<option [ngValue]="null">Select a book type</option>
<option [ngValue]="booksType[type]" *ngFor="let type of bookTypeArr">
{{ type }}</option
>
</select>
</div>
<div class="form-group">
<label>Publish date</label><span> * </span>
<input
#datepicker="ngbDatepicker"
class="form-control"
name="datepicker"
formControlName="publishDate"
ngbDatepicker
(click)="datepicker.toggle()"
/>
</div>
</form>
</ng-template>
<ng-template #abpFooter>
<button type="button" class="btn btn-secondary" #abpClose>
{{ "AbpAccount::Close" | abpLocalization }}
</button>
<button class="btn btn-primary" (click)="save()" [disabled]="form.invalid">
<i class="fa fa-check mr-1"></i>
{{ "AbpAccount::Save" | abpLocalization }}
</button>
</ng-template>
</abp-modal>

0
samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.scss

25
samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BookListComponent } from './book-list.component';
describe('BookListComponent', () => {
let component: BookListComponent;
let fixture: ComponentFixture<BookListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BookListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BookListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

109
samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.ts

@ -1,109 +0,0 @@
import { Component, OnInit } from "@angular/core";
import { Store, Select } from "@ngxs/store";
import { BooksState } from "../../store/states";
import { Observable } from "rxjs";
import { Books } from "../../store/models";
import { GetBooks, CreateUpdateBook, DeleteBook } from "../../store/actions";
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import {
NgbDateNativeAdapter,
NgbDateAdapter
} from "@ng-bootstrap/ng-bootstrap";
import { BooksService } from "../shared/books.service";
import { ConfirmationService, Confirmation } from "@abp/ng.theme.shared";
@Component({
selector: "app-book-list",
templateUrl: "./book-list.component.html",
styleUrls: ["./book-list.component.scss"],
providers: [{ provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }]
})
export class BookListComponent implements OnInit {
@Select(BooksState.getBooks)
books$: Observable<Books.Book[]>;
booksType = Books.BookType;
bookTypeArr = Object.keys(Books.BookType).filter(
bookType => typeof this.booksType[bookType] === "number"
);
loading = false;
isModalOpen = false;
form: FormGroup;
selectedBook = {} as Books.Book;
constructor(
private store: Store,
private fb: FormBuilder,
private booksService: BooksService,
private confirmationService: ConfirmationService
) {}
ngOnInit() {
this.get();
}
get() {
this.loading = true;
this.store.dispatch(new GetBooks()).subscribe(() => {
this.loading = false;
});
}
createBook() {
this.selectedBook = {} as Books.Book;
this.buildForm();
this.isModalOpen = true;
}
editBook(id: string) {
this.booksService.getById(id).subscribe(book => {
this.selectedBook = book;
this.buildForm();
this.isModalOpen = true;
});
}
buildForm() {
console.warn(this.selectedBook);
this.form = this.fb.group({
name: [this.selectedBook.name || "", Validators.required],
type: [this.selectedBook.type || null, Validators.required],
publishDate: [
this.selectedBook.publishDate
? new Date(this.selectedBook.publishDate)
: null,
Validators.required
],
price: [this.selectedBook.price || null, Validators.required]
});
}
save() {
if (this.form.invalid) {
return;
}
this.store
.dispatch(new CreateUpdateBook(this.form.value, this.selectedBook.id))
.subscribe(() => {
this.isModalOpen = false;
this.form.reset();
this.get();
});
}
delete(id: string, name: string) {
this.confirmationService
.warn("::AreYouSureToDelete", "AbpAccount::AreYouSure")
.subscribe(status => {
if (status === Confirmation.Status.confirm) {
this.store.dispatch(new DeleteBook(id)).subscribe(() => this.get());
}
});
}
}

19
samples/BookStore-Angular-MongoDb/angular/src/app/books/books-routing.module.ts

@ -1,19 +0,0 @@
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { BooksComponent } from "./books.component";
import { BookListComponent } from "./book-list/book-list.component";
const routes: Routes = [
{
path: "",
component: BooksComponent,
children: [{ path: "", component: BookListComponent }]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class BooksRoutingModule {}

1
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.html

@ -1 +0,0 @@
<router-outlet></router-outlet>

0
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.scss

25
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BooksComponent } from './books.component';
describe('BooksComponent', () => {
let component: BooksComponent;
let fixture: ComponentFixture<BooksComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BooksComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BooksComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.ts

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-books',
templateUrl: './books.component.html',
styleUrls: ['./books.component.scss']
})
export class BooksComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

14
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.module.ts

@ -1,14 +0,0 @@
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { BooksRoutingModule } from "./books-routing.module";
import { BooksComponent } from "./books.component";
import { BookListComponent } from "./book-list/book-list.component";
import { SharedModule } from "../shared/shared.module";
import { NgbDatepickerModule } from "@ng-bootstrap/ng-bootstrap";
@NgModule({
declarations: [BooksComponent, BookListComponent],
imports: [CommonModule, BooksRoutingModule, SharedModule, NgbDatepickerModule]
})
export class BooksModule {}

12
samples/BookStore-Angular-MongoDb/angular/src/app/books/shared/books.service.spec.ts

@ -1,12 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { BooksService } from './books.service';
describe('BooksService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: BooksService = TestBed.get(BooksService);
expect(service).toBeTruthy();
});
});

51
samples/BookStore-Angular-MongoDb/angular/src/app/books/shared/books.service.ts

@ -1,51 +0,0 @@
import { Injectable } from '@angular/core';
import { RestService } from '@abp/ng.core';
import { Books } from '../../store/models';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class BooksService {
constructor(private restService: RestService) {}
get(): Observable<Books.Response> {
return this.restService.request<void, Books.Response>({
method: 'GET',
url: '/api/app/book'
});
}
create(createBookInput: Books.CreateUpdateBookInput): Observable<Books.Book> {
return this.restService.request<Books.CreateUpdateBookInput, Books.Book>({
method: 'POST',
url: '/api/app/book',
body: createBookInput
});
}
getById(id: string): Observable<Books.Book> {
return this.restService.request<void, Books.Book>({
method: 'GET',
url: `/api/app/book/${id}`
});
}
update(
updateBookInput: Books.CreateUpdateBookInput,
id: string
): Observable<Books.Book> {
return this.restService.request<Books.CreateUpdateBookInput, Books.Book>({
method: 'PUT',
url: `/api/app/book/${id}`,
body: updateBookInput
});
}
delete(id: string): Observable<void> {
return this.restService.request<void, void>({
method: 'DELETE',
url: `/api/app/book/${id}`
});
}
}

18
samples/BookStore-Angular-MongoDb/angular/src/app/home/home-routing.module.ts

@ -1,18 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';
import { ApplicationLayoutComponent } from '@abp/ng.theme.basic';
const routes: Routes = [
{
path: '',
component: ApplicationLayoutComponent,
children: [{ path: '', component: HomeComponent }],
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class HomeRoutingModule {}

20
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.html

@ -1,20 +0,0 @@
<div id="AbpContentToolbar"></div>
<div class="jumbotron text-center">
<h1>{{ '::Welcome' | abpLocalization }}</h1>
<div class="row">
<div class="col-md-6 mx-auto">
<p>{{ '::LongWelcomeMessage' | abpLocalization }}</p>
<hr class="my-4" />
</div>
</div>
<a href="https://abp.io?ref=tmpl" target="_blank" class="btn btn-primary px-4">abp.io</a>
<a
*ngIf="!hasLoggedIn"
routerLink="/account/login"
[state]="{ redirectUrl: '/' }"
class="px-4 btn btn-primary ml-1"
role="button"
id="login-button"
><i class="fa fa-sign-in"></i> {{ 'AbpAccount::Login' | abpLocalization }}</a
>
</div>

51
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.spec.ts

@ -1,51 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OAuthService } from 'angular-oauth2-oidc';
import { HomeComponent } from './home.component';
import { HomeModule } from './home.module';
import { RouterTestingModule } from '@angular/router/testing';
import { NgxsModule } from '@ngxs/store';
import { By } from '@angular/platform-browser';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
let mockOAuthService: { hasValidAccessToken: () => boolean };
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ NgxsModule.forRoot(), HomeModule, RouterTestingModule],
providers: [{ provide: OAuthService, useValue: { hasValidAccessToken: () => false } }],
});
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
mockOAuthService = TestBed.get(OAuthService);
fixture.detectChanges();
});
describe('#hasLoggedIn', () => {
it('should return the hasValidAccessToken method of oAuthService', () => {
const spy = spyOn(mockOAuthService, 'hasValidAccessToken');
spy.and.returnValue(false);
expect(component.hasLoggedIn).toBe(false);
expect(spy).toHaveBeenCalled();
});
});
describe('login button', () => {
it('should display', () => {
const button = fixture.debugElement.query(By.css('[routerLink="/account/login"]'));
expect(button).toBeTruthy();
expect(button.nativeElement.textContent).toContain('AbpAccount::Login');
});
it('should not display when user logged in', () => {
const spy = spyOn(mockOAuthService, 'hasValidAccessToken');
spy.and.returnValue(true);
fixture.detectChanges();
const button = fixture.debugElement.query(By.css('#login-button'));
expect(button).toBeFalsy();
});
});
});

14
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.ts

@ -1,14 +0,0 @@
import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
get hasLoggedIn(): boolean {
return this.oAuthService.hasValidAccessToken();
}
constructor(private oAuthService: OAuthService) {}
}

10
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.module.ts

@ -1,10 +0,0 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module';
import { HomeRoutingModule } from './home-routing.module';
import { HomeComponent } from './home.component';
@NgModule({
declarations: [HomeComponent],
imports: [SharedModule, HomeRoutingModule],
})
export class HomeModule {}

7
samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/account-wrapper.module.ts

@ -1,7 +0,0 @@
import { NgModule } from '@angular/core';
import { AccountModule } from '@abp/ng.account';
@NgModule({
imports: [AccountModule],
})
export class AccountWrapperModule {}

7
samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/identity-wrapper.module.ts

@ -1,7 +0,0 @@
import { NgModule } from '@angular/core';
import { IdentityModule } from '@abp/ng.identity';
@NgModule({
imports: [IdentityModule],
})
export class IdentityWrapperModule {}

7
samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/setting-management-wrapper.module.ts

@ -1,7 +0,0 @@
import { NgModule } from '@angular/core';
import { SettingManagementModule } from '@abp/ng.setting-management';
@NgModule({
imports: [SettingManagementModule],
})
export class SettingManagementWrapperModule {}

7
samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/tenant-management-wrapper.module.ts

@ -1,7 +0,0 @@
import { NgModule } from '@angular/core';
import { TenantManagementModule } from '@abp/ng.tenant-management';
@NgModule({
imports: [TenantManagementModule],
})
export class TenantManagementWrapperModule {}

29
samples/BookStore-Angular-MongoDb/angular/src/app/shared/shared.module.ts

@ -1,29 +0,0 @@
import { CoreModule } from '@abp/ng.core';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { NgModule } from '@angular/core';
import { ThemeBasicModule } from '@abp/ng.theme.basic';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { TableModule } from 'primeng/table';
import { NgxValidateCoreModule } from '@ngx-validate/core';
@NgModule({
declarations: [],
imports: [
CoreModule,
ThemeSharedModule,
ThemeBasicModule,
TableModule,
NgbDropdownModule,
NgxValidateCoreModule,
],
exports: [
CoreModule,
ThemeSharedModule,
ThemeBasicModule,
TableModule,
NgbDropdownModule,
NgxValidateCoreModule,
],
providers: [],
})
export class SharedModule {}

18
samples/BookStore-Angular-MongoDb/angular/src/app/store/actions/books.actions.ts

@ -1,18 +0,0 @@
import { Books } from "../models";
export class GetBooks {
static readonly type = "[Books] Get";
}
export class CreateUpdateBook {
static readonly type = "[Books] Create Update Book";
constructor(
public payload: Books.CreateUpdateBookInput,
public id?: string
) {}
}
export class DeleteBook {
static readonly type = "[Books] Delete";
constructor(public id: string) {}
}

1
samples/BookStore-Angular-MongoDb/angular/src/app/store/actions/index.ts

@ -1 +0,0 @@
export * from './books.actions';

41
samples/BookStore-Angular-MongoDb/angular/src/app/store/models/books.ts

@ -1,41 +0,0 @@
export namespace Books {
export interface State {
books: Response;
}
export interface Response {
items: Book[];
totalCount: number;
}
export interface Book {
name: string;
type: BookType;
publishDate: string;
price: number;
lastModificationTime: string;
lastModifierId: string;
creationTime: string;
creatorId: string;
id: string;
}
export enum BookType {
Undefined,
Adventure,
Biography,
Dystopia,
Fantastic,
Horror,
Science,
ScienceFiction,
Poetry
}
export interface CreateUpdateBookInput {
name: string;
type: BookType;
publishDate: string;
price: number;
}
}

1
samples/BookStore-Angular-MongoDb/angular/src/app/store/models/index.ts

@ -1 +0,0 @@
export * from './books';

47
samples/BookStore-Angular-MongoDb/angular/src/app/store/states/books.state.ts

@ -1,47 +0,0 @@
import { State, Action, StateContext, Selector } from "@ngxs/store";
import {
GetBooks,
CreateUpdateBook,
DeleteBook
} from "../actions/books.actions";
import { Books } from "../models/books";
import { BooksService } from "../../books/shared/books.service";
import { tap } from "rxjs/operators";
@State<Books.State>({
name: "BooksState",
defaults: { books: {} } as Books.State
})
export class BooksState {
@Selector()
static getBooks(state: Books.State) {
return state.books.items || [];
}
constructor(private booksService: BooksService) {}
@Action(GetBooks)
get(ctx: StateContext<Books.State>) {
return this.booksService.get().pipe(
tap(booksResponse => {
ctx.patchState({
books: booksResponse
});
})
);
}
@Action(CreateUpdateBook)
save(ctx: StateContext<Books.State>, action: CreateUpdateBook) {
if (action.id) {
return this.booksService.update(action.payload, action.id);
} else {
return this.booksService.create(action.payload);
}
}
@Action(DeleteBook)
delete(ctx: StateContext<Books.State>, action: DeleteBook) {
return this.booksService.delete(action.id);
}
}

1
samples/BookStore-Angular-MongoDb/angular/src/app/store/states/index.ts

@ -1 +0,0 @@
export * from "./books.state";

0
samples/BookStore-Angular-MongoDb/angular/src/assets/.gitkeep

25
samples/BookStore-Angular-MongoDb/angular/src/environments/environment.hmr.ts

@ -1,25 +0,0 @@
export const environment = {
production: false,
hmr: true,
application: {
name: 'BookStore',
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44317',
clientId: 'BookStore_App',
dummyClientSecret: '1q2w3e*',
scope: 'BookStore',
showDebugInformation: true,
oidc: false,
requireHttps: true,
},
apis: {
default: {
url: 'https://localhost:44317',
},
},
localization: {
defaultResourceName: 'BookStore',
},
};

25
samples/BookStore-Angular-MongoDb/angular/src/environments/environment.prod.ts

@ -1,25 +0,0 @@
export const environment = {
production: true,
hmr: false,
application: {
name: 'BookStore',
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44317',
clientId: 'BookStore_App',
dummyClientSecret: '1q2w3e*',
scope: 'BookStore',
showDebugInformation: true,
oidc: false,
requireHttps: true,
},
apis: {
default: {
url: 'https://localhost:44317',
},
},
localization: {
defaultResourceName: 'BookStore',
},
};

25
samples/BookStore-Angular-MongoDb/angular/src/environments/environment.ts

@ -1,25 +0,0 @@
export const environment = {
production: false,
hmr: false,
application: {
name: 'BookStore',
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44317',
clientId: 'BookStore_App',
dummyClientSecret: '1q2w3e*',
scope: 'BookStore',
showDebugInformation: true,
oidc: false,
requireHttps: true,
},
apis: {
default: {
url: 'https://localhost:44317',
},
},
localization: {
defaultResourceName: 'BookStore',
},
};

BIN
samples/BookStore-Angular-MongoDb/angular/src/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

16
samples/BookStore-Angular-MongoDb/angular/src/index.html

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>BookStore</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body class="bg-light">
<app-root>
<div class="donut centered"></div>
</app-root>
</body>
</html>

20
samples/BookStore-Angular-MongoDb/angular/src/main.ts

@ -1,20 +0,0 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BootstrapModuleFn as Bootstrap, hmr, WebpackModule } from '@ngxs/hmr-plugin';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
declare const module: WebpackModule;
if (environment.production) {
enableProdMode();
}
const bootstrap: Bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);
if (environment.hmr) {
hmr(module, bootstrap).catch(err => console.error(err));
} else {
bootstrap().catch(err => console.log(err));
}

63
samples/BookStore-Angular-MongoDb/angular/src/polyfills.ts

@ -1,63 +0,0 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

26
samples/BookStore-Angular-MongoDb/angular/src/styles.scss

@ -1,26 +0,0 @@
/* You can add global styles to this file, and also import other style files */
@keyframes donut-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.donut {
display: inline-block;
border: 4px solid rgba(0, 0, 0, 0.1);
border-left-color: #7983ff;
border-radius: 50%;
width: 30px;
height: 30px;
animation: donut-spin 1.2s linear infinite;
&.centered {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}

20
samples/BookStore-Angular-MongoDb/angular/src/test.ts

@ -1,20 +0,0 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

9
samples/BookStore-Angular-MongoDb/angular/tsconfig.app.json

@ -1,9 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["src/test.ts", "src/**/*.spec.ts"]
}

23
samples/BookStore-Angular-MongoDb/angular/tsconfig.json

@ -1,23 +0,0 @@
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}

18
samples/BookStore-Angular-MongoDb/angular/tsconfig.spec.json

@ -1,18 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}

92
samples/BookStore-Angular-MongoDb/angular/tslint.json

@ -1,92 +0,0 @@
{
"extends": "tslint:recommended",
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-use-before-declare": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"trailing-comma": false,
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
},
"rulesDirectory": [
"codelyzer"
]
}

1
samples/BookStore-Angular-MongoDb/aspnet-core/.gitattributes

@ -1 +0,0 @@
**/wwwroot/libs/** linguist-vendored

259
samples/BookStore-Angular-MongoDb/aspnet-core/.gitignore

@ -1,259 +0,0 @@
## 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
# BookStore
src/Acme.BookStore.Web/Logs/*
src/Acme.BookStore.Web.Host/Logs/*
src/Acme.BookStore.IdentityServer/Logs/*
src/Acme.BookStore.HttpApi.Host/Logs/*
src/Acme.BookStore.HttpApi.Host/Logs/*

123
samples/BookStore-Angular-MongoDb/aspnet-core/Acme.BookStore.sln

@ -1,123 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain", "src\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application", "src\Acme.BookStore.Application\Acme.BookStore.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
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}") = "Acme.BookStore.Application.Tests", "test\Acme.BookStore.Application.Tests\Acme.BookStore.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.MongoDB", "src\Acme.BookStore.MongoDB\Acme.BookStore.MongoDB.csproj", "{E3444355-D47E-431E-BDD0-DD3A7113B2AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Shared", "src\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application.Contracts", "src\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi", "src\Acme.BookStore.HttpApi\Acme.BookStore.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Client", "src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.TestBase", "test\Acme.BookStore.TestBase\Acme.BookStore.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Tests", "test\Acme.BookStore.Domain.Tests\Acme.BookStore.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.MongoDB.Tests", "test\Acme.BookStore.MongoDB.Tests\Acme.BookStore.MongoDB.Tests.csproj", "{6015D17B-104B-4EC2-A9B7-D8A40C891458}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Client.ConsoleTestApp", "test\Acme.BookStore.HttpApi.Client.ConsoleTestApp\Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.DbMigrator", "src\Acme.BookStore.DbMigrator\Acme.BookStore.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acme.BookStore.HttpApi.Host", "src\Acme.BookStore.HttpApi.Host\Acme.BookStore.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}"
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
{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
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.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
{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
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.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
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.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}
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E3444355-D47E-431E-BDD0-DD3A7113B2AE} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{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}
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{6015D17B-104B-4EC2-A9B7-D8A40C891458} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
EndGlobalSection
EndGlobal

23
samples/BookStore-Angular-MongoDb/aspnet-core/Acme.BookStore.sln.DotSettings

@ -1,23 +0,0 @@
<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>

7
samples/BookStore-Angular-MongoDb/aspnet-core/common.props

@ -1,7 +0,0 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>

22
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj

@ -1,22 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="2.1.1" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="2.1.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="2.1.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="2.1.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="2.1.1" />
</ItemGroup>
</Project>

16
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/BookDto.cs

@ -1,16 +0,0 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Acme.BookStore
{
public class BookDto : AuditedEntityDto<Guid>
{
public string Name { get; set; }
public BookType Type { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
}
}

22
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs

@ -1,22 +0,0 @@
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
namespace Acme.BookStore
{
[DependsOn(
typeof(BookStoreDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule)
)]
public class BookStoreApplicationContractsModule : AbpModule
{
}
}

21
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/CreateUpdateBookDto.cs

@ -1,21 +0,0 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Acme.BookStore
{
public class CreateUpdateBookDto
{
[Required]
[StringLength(128)]
public string Name { get; set; }
[Required]
public BookType Type { get; set; } = BookType.Undefined;
[Required]
public DateTime PublishDate { get; set; }
[Required]
public float Price { get; set; }
}
}

17
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/IBookAppService.cs

@ -1,17 +0,0 @@
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace Acme.BookStore
{
public interface IBookAppService :
ICrudAppService< //Defines CRUD methods
BookDto, //Used to show books
Guid, //Primary key of the book entity
PagedAndSortedResultRequestDto, //Used for paging/sorting on getting a list of books
CreateUpdateBookDto, //Used to create a new book
CreateUpdateBookDto> //Used to update a book
{
}
}

22
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs

@ -1,22 +0,0 @@
using Acme.BookStore.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace Acme.BookStore.Permissions
{
public class BookStorePermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(BookStorePermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(BookStorePermissions.MyPermission1, L("Permission:MyPermission1"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<BookStoreResource>(name);
}
}
}

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs

@ -1,10 +0,0 @@
namespace Acme.BookStore.Permissions
{
public static class BookStorePermissions
{
public const string GroupName = "BookStore";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
}
}

23
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="2.1.1" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="2.1.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="2.1.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="2.1.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="2.1.1" />
</ItemGroup>
</Project>

18
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookStoreAppService.cs

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using Acme.BookStore.Localization;
using Volo.Abp.Application.Services;
namespace Acme.BookStore
{
/* Inherit your application services from this class.
*/
public abstract class BookStoreAppService : ApplicationService
{
protected BookStoreAppService()
{
LocalizationResource = typeof(BookStoreResource);
}
}
}

16
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs

@ -1,16 +0,0 @@
using AutoMapper;
namespace Acme.BookStore
{
public class BookStoreApplicationAutoMapperProfile : Profile
{
public BookStoreApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<Book, BookDto>();
CreateMap<CreateUpdateBookDto, Book>();
}
}
}

30
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookStoreApplicationModule.cs

@ -1,30 +0,0 @@
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
namespace Acme.BookStore
{
[DependsOn(
typeof(BookStoreDomainModule),
typeof(AbpAccountApplicationModule),
typeof(BookStoreApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule)
)]
public class BookStoreApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreApplicationModule>();
});
}
}
}

19
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/IBookAppService.cs

@ -1,19 +0,0 @@
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
namespace Acme.BookStore
{
public class BookAppService :
CrudAppService<Book, BookDto, Guid, PagedAndSortedResultRequestDto,
CreateUpdateBookDto, CreateUpdateBookDto>,
IBookAppService
{
public BookAppService(IRepository<Book, Guid> repository)
: base(repository)
{
}
}
}

34
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj

@ -1,34 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="2.1.1" />
<ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" />
<ProjectReference Include="..\Acme.BookStore.MongoDB\Acme.BookStore.MongoDB.csproj" />
</ItemGroup>
</Project>

20
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs

@ -1,20 +0,0 @@
using Acme.BookStore.MongoDB;
using Volo.Abp.Autofac;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.Modularity;
namespace Acme.BookStore.DbMigrator
{
[DependsOn(
typeof(AbpAutofacModule),
typeof(BookStoreMongoDbModule),
typeof(BookStoreApplicationContractsModule)
)]
public class BookStoreDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBackgroundJobOptions>(options => options.IsJobExecutionEnabled = false);
}
}
}

34
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/DbMigratorHostedService.cs

@ -1,34 +0,0 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Acme.BookStore.Data;
using Serilog;
using Volo.Abp;
namespace Acme.BookStore.DbMigrator
{
public class DbMigratorHostedService : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create<BookStoreDbMigratorModule>(options =>
{
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
}))
{
application.Initialize();
await application
.ServiceProvider
.GetRequiredService<BookStoreDbMigrationService>()
.MigrateAsync();
application.Shutdown();
}
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
}

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Logs/logs.txt

@ -1,10 +0,0 @@
2020-02-28 10:50:32.009 +03:00 [INF] Started database migrations...
2020-02-28 10:50:32.039 +03:00 [INF] Migrating host database schema...
2020-02-28 10:50:32.040 +03:00 [INF] Executing host database seed...
2020-02-28 10:50:34.397 +03:00 [INF] Successfully completed host database migrations.
2020-02-28 10:50:34.567 +03:00 [INF] Successfully completed database migrations.
2020-02-28 14:38:28.119 +03:00 [INF] Started database migrations...
2020-02-28 14:38:28.145 +03:00 [INF] Migrating host database schema...
2020-02-28 14:38:28.146 +03:00 [INF] Executing host database seed...
2020-02-28 14:38:29.427 +03:00 [INF] Successfully completed host database migrations.
2020-02-28 14:38:29.584 +03:00 [INF] Successfully completed database migrations.

38
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Program.cs

@ -1,38 +0,0 @@
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace Acme.BookStore.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("Acme.BookStore", LogEventLevel.Debug)
#else
.MinimumLevel.Override("Acme.BookStore", LogEventLevel.Information)
#endif
.Enrich.FromLogContext()
.WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt"))
.WriteTo.Console()
.CreateLogger();
await CreateHostBuilder(args).RunConsoleAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<DbMigratorHostedService>();
});
}
}

18
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/appsettings.json

@ -1,18 +0,0 @@
{
"ConnectionStrings": {
"Default": "mongodb://localhost:27017/BookStore"
},
"IdentityServer": {
"Clients": {
"BookStore_Web": {
"ClientId": "BookStore_Web",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44383"
},
"BookStore_App": {
"ClientId": "BookStore_App",
"ClientSecret": "1q2w3e*"
}
}
}
}

1
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/tempkey.rsa

@ -1 +0,0 @@
{"KeyId":"uJGOjuG6IaY44NtDmqRybg","Parameters":{"D":"MneJN4+n7rLDTJ015kE8QUHUJvHOEt+HtpMZU/m/cQ5p1wLLKqZyml6q/RFXwtfczSXDh+ThyZ6czEHyPFdOvByVEJxdky8r27TPdKv+dGsKXmwoHOqdf9eAR3aTMmS4D8ljPIwc/3/PdE/SrMc2uRTzYBcNHmMpUC0cOQ+OXrfrGwfgyNKTFCrNKEnkn5uFF2Q2tCMAfi2kGdLJZldFW8Bb522rl+lUoEgrnWE6OX2FqYhVD2JxfbMjrSfHf4snwdde0Vc9ee/avtXk4wHTYl1E/xJ6HDRA4UDI+dcIEQ0b1xHGSruy+0LBark+tjumQExDSiK4YbTtGUCwfvksgQ==","DP":"SJps1XBF8F3/BeJihJA0pw43Xus2keWqZSwcCjr3c0GA/dxpdIXwZlSvoa8F0uVCtSXa7n8efBTbsICKNctV+pueeSbv3rgaYiFO39Fnq3mO3uvo9VOuOJhOMc/kNNpKJT5qHaqdl1pL6NIP4Hx4GdG12d6+qka8u6D9iBydxIE=","DQ":"Lf2dO5CGcX0xs2rRVUruBozLCnhwWRIWEeTAV1FxpAH8clFcmARblMtzYh0Q9UbH/2jUPJo3W1LBOW7SSgrLVHvytc8oSqbYc1l8QXsY8eQqQKz4Ey+huJU4iZgfme7a8lwf6hsJsuigLWgQ67DyKSTHiIINzXfO+phfUEnszF0=","Exponent":"AQAB","InverseQ":"z5fhltiEYkrWSCaBAFcmXBMtreVEaNl7kpFQvHS8FR+QFwqwMOhLGdTTArp+XmdOSYq5xsTpN87iDORIdURjwkGFBNSeoABaS/WbS75mBAHc4fy0RmzoSpnVVJt9LILtIJmNqxAH+HqsiIxE1MhL89mQhZEcqRMN1mOyr0RCSqY=","Modulus":"vEFGJZO6rP+bRnzpPyc34y32mSvFm9yK3UJ8kdB15F781GXaznAg4mU7FQB2umrcAm1SilgfGiHAtzpkxy44f5MkSO9KJVeSs0N+6+X+DbCC7aIrd3quKSJgAjK3lMFdihUdJ+acSMA0+3yrmSfJVV4QMGlWcTjACab57SRJ0kHxzfXrYYexpbxejGMoT3sU6rpLq7DBqWOO+6mv5v00V6IfnYio56smpBVLviNxDs5gOa4x6idiUm4crMwg9BlfGUhWJagd+XAcnNpZL1DNP2pfD17YoT5AAkI8YICiH2iNoiZZFSx81jNLQ91VzyXzFixGb7z4y83wv6UlcVdCDw==","P":"59As5b9v7n0PvPfZLI8YAwdwSXef+sPDkjpViYD00++XByBkyQp2iYE1lZJ9ZHAeQxs3AX9NJEkIeRS2XptZJijFnaN4eaBg6QXTEKQf/Ti6Foi9ygd6QPxRcYvJSD5yfK1NgH7bFSBLEgJaeodz/joD/F2Ysd42qCTU730q18E=","Q":"z+WkIXBxm/scuNlX1LVL2Q/QYdBfzTBm6H6b9AY7fxfGcQpmFddzdz4NTl9VrkanJnkN53bDrGktqneknpWeloAuFQKdd5jvMYLD6Rq0sKqTNWsNvYgV5jOCZe5vI1LCU2Xsr8fYaSOd7iKCPPytgVdGnitoayzAlLx5x04+Dc8="}}

26
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj

@ -1,26 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="2.1.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="2.1.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\BookStore\*.json" />
<Content Remove="Localization\BookStore\*.json" />
</ItemGroup>
</Project>

7
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookStoreDomainErrorCodes.cs

@ -1,7 +0,0 @@
namespace Acme.BookStore
{
public static class BookStoreDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
}
}

45
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs

@ -1,45 +0,0 @@
using Acme.BookStore.Localization;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace Acme.BookStore
{
[DependsOn(
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpBackgroundJobsDomainSharedModule),
typeof(AbpFeatureManagementDomainSharedModule),
typeof(AbpIdentityDomainSharedModule),
typeof(AbpIdentityServerDomainSharedModule),
typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class BookStoreDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BookStoreDomainSharedModule>("Acme.BookStore");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<BookStoreResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/BookStore");
});
}
}
}

15
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookType.cs

@ -1,15 +0,0 @@
namespace Acme.BookStore
{
public enum BookType
{
Undefined,
Adventure,
Biography,
Dystopia,
Fantastic,
Horror,
Science,
ScienceFiction,
Poetry
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/cs.json

@ -1,8 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:Home": "Úvod",
"Welcome": "Vítejte",
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
}
}

20
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json

@ -1,20 +0,0 @@
{
"culture": "en",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.",
"Menu:BookStore": "Book Store",
"Menu:Books": "Books",
"PublishDate": "Publish date",
"Actions": "Actions",
"Edit": "Edit",
"NewBook": "New book",
"Name": "Name",
"Type": "Type",
"Price": "Price",
"CreationTime": "Creation time",
"AreYouSureToDelete": "Are you sure you want to delete this item?"
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pl.json

@ -1,8 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:Home": "Home",
"Welcome": "Witaj",
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pt-BR.json

@ -1,8 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:Home": "Principal",
"Welcome": "Seja bem-vindo!",
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/tr.json

@ -1,8 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu: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 abp.io adresini ziyaret edebilirsiniz."
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/vi.json

@ -1,8 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:Home": "Trang chủ",
"Welcome": "Chào mừng bạn",
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json

@ -1,8 +0,0 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Home": "首页",
"Welcome": "欢迎",
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io."
}
}

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hant.json

@ -1,8 +0,0 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:Home": "首頁",
"Welcome": "歡迎",
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
}
}

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStoreResource.cs

@ -1,10 +0,0 @@
using Volo.Abp.Localization;
namespace Acme.BookStore.Localization
{
[LocalizationResourceName("BookStore")]
public class BookStoreResource
{
}
}

11
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs

@ -1,11 +0,0 @@
namespace Acme.BookStore.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;
}
}

27
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj

@ -1,27 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="2.1.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="2.1.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="2.1.1" />
</ItemGroup>
</Project>

30
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Book.cs

@ -1,30 +0,0 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
namespace Acme.BookStore
{
public class Book : AuditedAggregateRoot<Guid>
{
public string Name { get; set; }
public BookType Type { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
protected Book()
{
}
public Book(Guid id, string name, BookType type, DateTime publishDate, float price) :
base(id)
{
Name = name;
Type = type;
PublishDate = publishDate;
Price = price;
}
}
}

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

Loading…
Cancel
Save