Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/1633/head
mehmet-erim 7 years ago
parent
commit
ff9488f772
  1. 2
      docs/en/Startup-Templates/Application.md
  2. 55
      docs/en/Tutorials/Angular/Part-II.md
  3. 7
      docs/zh-Hans/CLI.md
  4. 2
      docs/zh-Hans/Getting-Started-AspNetCore-Application.md
  5. 2
      docs/zh-Hans/Getting-Started-AspNetCore-MVC-Template.md
  6. 2
      docs/zh-Hans/Getting-Started-Console-Application.md
  7. 54
      docs/zh-Hans/Startup-Templates/Application.md
  8. 4
      docs/zh-Hans/Startup-Templates/Index.md
  9. 4
      docs/zh-Hans/Startup-Templates/Module.md
  10. 10
      docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-I.md
  11. 4
      docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-II.md
  12. 2
      docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-III.md
  13. BIN
      docs/zh-Hans/images/bookstore-swagger-ui-host.png
  14. BIN
      docs/zh-Hans/images/bookstore-visual-studio-solution-for-spa.png
  15. 14
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HttpContextTenantResolveResultAccessor.cs
  16. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj
  17. 2
      framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj
  18. 6
      framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj
  19. 2
      framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj
  20. 2
      framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj
  21. 4
      framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj
  22. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj
  23. 4
      framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj
  24. 16
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
  25. 2
      framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj
  26. 4
      framework/test/AbpTestBase/AbpTestBase.csproj
  27. 2
      framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj
  28. 2
      framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj
  29. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj
  30. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj
  31. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj
  32. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj
  33. 2
      framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj
  34. 2
      framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj
  35. 2
      framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj
  36. 2
      framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj
  37. 2
      framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj
  38. 2
      framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj
  39. 2
      framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj
  40. 2
      framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj
  41. 2
      framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj
  42. 2
      framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj
  43. 4
      framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj
  44. 2
      framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj
  45. 2
      framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj
  46. 2
      framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj
  47. 4
      framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj
  48. 2
      framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj
  49. 2
      framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj
  50. 2
      framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj
  51. 2
      framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj
  52. 2
      framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj
  53. 2
      framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj
  54. 2
      framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj
  55. 2
      framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj
  56. 2
      framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj
  57. 2
      framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj
  58. 2
      framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj
  59. 2
      framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj
  60. 2
      framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj
  61. 2
      framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj
  62. 2
      framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj
  63. 2
      framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj
  64. 2
      framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj
  65. 2
      framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj
  66. 2
      framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj
  67. 2
      framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj
  68. 5
      samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.MongoDB.Tests/MongoDb/BookStoreMongoDbTestModule.cs
  69. 2
      templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs
  70. 5
      templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MongoDB/MyProjectNameMongoDbTestModule.cs

2
docs/en/Startup-Templates/Application.md

@ -266,8 +266,6 @@ Server side is very similar to the solution described above. `.HttpApi.Host` pro
The files under the `angular/src/environments` folder has the essential configuration of the application.
####
## What's Next?
- See [Getting Started With the ASP.NET Core MVC Template](../Getting-Started-AspNetCore-MVC-Template.md) to create a new solution and run it for this template.

55
docs/en/Tutorials/Angular/Part-II.md

@ -1,4 +1,4 @@
## Angular Tutorial - Part I
## Angular Tutorial - Part II
### About this Tutorial
@ -9,7 +9,11 @@ This is the second part of the Angular tutorial series. See all parts:
You can access to the **source code** of the application from the [GitHub repository](https://github.com/abpframework/abp/tree/dev/samples/BookStore-Angular-MongoDb).
### Type Definition
### Creating a New Book
In this section, you will learn how to create a new modal dialog form to create a new book.
#### Type Definition
Create an interface, named `CreateUpdateBookInput` in the `books.ts` as shown below:
@ -27,9 +31,9 @@ export namespace Books {
`CreateUpdateBookInput` interface matches the `CreateUpdateBookDto` in the backend.
### Add HTTP POST Method
#### Service Method
Open the `books.service.ts` and add a new method, named create to perform an HTTP POST request to the server:
Open the `books.service.ts` and add a new method, named `create` to perform an HTTP POST request to the server:
```typescript
create(body: Books.CreateUpdateBookInput): Observable<Books.Book> {
@ -43,7 +47,7 @@ create(body: Books.CreateUpdateBookInput): Observable<Books.Book> {
}
```
### State Definitions
#### State Definitions
Add the `CreateUpdateBook` action to `books.actions.ts` as shown below:
@ -63,13 +67,15 @@ Open `books.state.ts` and define the `save` method that will listen to a `Create
```typescript
@Action(CreateUpdateBook)
save({ dispatch }: StateContext<Books.State>, { payload }: CreateUpdateBook) {
return this.booksService.create(payload).pipe(switchMap(() => dispatch(new GetBooks())));
return this.booksService
.create(payload)
.pipe(switchMap(() => dispatch(new GetBooks())));
}
```
When the `SaveBook` action dispached, the save method runs and then call `create` method of the `BooksService`. After, `BooksService` sends a POST request to the backend. When finished this HTTP call, `BooksState` dispatches `GetBooks` action for getting up-to-date books.
When the `SaveBook` action dispatched, the save method is executed. It call `create` method of the `BooksService` defined before. After the service call, `BooksState` dispatches the `GetBooks` action to get books again from the server to refresh the page.
### Add a Modal to BookListComponent
#### Add a Modal to BookListComponent
Open the `book-list.component.html` and add the `abp-modal` to show/hide the book form.
@ -89,7 +95,9 @@ Open the `book-list.component.html` and add the `abp-modal` to show/hide the boo
</abp-modal>
```
Then, add the `New book` button to show the modal.
`abp-modal` is a pre-built component to show modals. While you could use another approach to show a modal, `abp-modal` provides additional benefits.
Add a button, labeled `New book` to show the modal.
```html
<div class="row">
@ -106,20 +114,12 @@ Then, add the `New book` button to show the modal.
</div>
```
Open `book-list.component.ts` and add the `isModalOpen` variable and `onAdd` method to show/hide the modal.
Open the `book-list.component.ts` and add `isModalOpen` variable and `onAdd` method to show/hide the modal.
```typescript
//...
loading = false;
isModalOpen = false;
```
```typescript
// ...
ngOnInit() {
// ...
}
//...
onAdd() {
this.isModalOpen = true;
@ -128,24 +128,17 @@ onAdd() {
![empty-modal](images/bookstore-empty-new-book-modal.png)
### Create a Reactive Form
#### Create a Reactive Form
[Reactive forms](https://angular.io/guide/reactive-forms) provide a model-driven approach to handling form inputs whose values change over time.
> [Reactive forms](https://angular.io/guide/reactive-forms) provide a model-driven approach to handling form inputs whose values change over time.
Add the `form` variable and import to the FormGroup from `@angular/core`
Add a `form` variable and inject a `FormBuilder` service to the `book-list.component.ts` as shown below (remember add the import statement).
```typescript
//...
isModalOpen = false;
import { FormGroup, FormBuilder } from '@angular/forms';
form: FormGroup;
```
Inject `FormBuilder` dependency by adding it to the `BookListComponent` constructor.
```typescript
import { FormBuilder } from '@angular/forms';
//...
constructor(
//...
private fb: FormBuilder
@ -154,7 +147,7 @@ constructor(
> The [FormBuilder](https://angular.io/api/forms/FormBuilder) service provides convenient methods for generating controls. It reduces the amount of boilerplate needed to build complex forms.
Add the `buildForm` method for create book form.
Add the `buildForm` method to create book form.
```typescript
buildForm() {

7
docs/zh-Hans/CLI.md

@ -45,13 +45,13 @@ abp new Acme.BookStore
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
* `--tiered`: 创建分层解决方案,Web和Http Api层在物理上是分开的. 如果未指定会创建一个分层的解决方案, 此解决方案没有那么复杂,适合大多数场景.
* `mvc-module`: ASP.NET Core [MVC模块模板](Startup-Templates/Mvc-Module.md). 其他选项:
* `module`: [模块模板](Startup-Templates/Module.md). 其他选项:
* `--no-ui`: 不包含UI. 仅创建服务模块 (也称为微服务 - 没有UI).
* `--output-folder``-o`: 指定输出文件夹,默认是当前目录.
### add-package
添加新的ABP包到项目中
通过以下方式将ABP包添加到项目中
* 添加nuget包做为项目的依赖项目.
* 添加 `[DependsOn(...)]` attribute到项目的模块类 (请参阅 [模块开发文档](Module-Development-Basics.md)).
@ -78,7 +78,7 @@ abp add-package Volo.Abp.MongoDB
### add-module
通过查找模块的所有包,查找解决方案中的相关项目,并将每个包添加到解决方案中的相应项目,从而将多包模块添加到解决方案中.
通过查找模块的所有包,查找解决方案中的相关项目,并将每个包添加到解决方案中的相应项目,从而将[多包应用程序模块](Modules/Index)添加到解决方案中.
> 由于分层,不同的数据库提供程序选项或其他原因,业务模块通常由多个包组成. 使用`add-module`命令可以大大简化向模块添加模块的过程. 但是每个模块可能需要一些其他配置,这些配置通常在相关模块的文档中指出.
@ -100,6 +100,7 @@ abp add-module Volo.Blogging
* `--solution``-s`: 指定解决方案 (.sln) 路径. 如果未指定,CLI会尝试在当前目录中寻找.sln文件.
* `--skip-db-migrations`: 对于EF Core 数据库提供程序,它会自动添加新代码的第一次迁移 (`Add-Migration`) 并且在需要时更新数据库 (`Update-Database`). 指定此选项可跳过此操作.
* `-sp``--startup-project`: 启动项目的项目文件夹的相对路径. 默认值是当前文件夹.
### update

2
docs/zh-Hans/Getting-Started-AspNetCore-Application.md

@ -186,4 +186,4 @@ public class Program
### 源码
从[此处](../samples/BasicAspNetCoreApplication)获取本教程中创建的示例项目的源代码.
从[此处](https://github.com/abpframework/abp/tree/dev/samples/BasicAspNetCoreApplication)获取本教程中创建的示例项目的源代码.

2
docs/zh-Hans/Getting-Started-AspNetCore-MVC-Template.md

@ -35,7 +35,7 @@ abp new Acme.BookStore
该解决方案具有分层结构(基于[Domain Driven Design](Domain-Driven-Design.md)), 并包含配置好的的单元&集成测试项目,可与**EF Core**和**SQLite**数据库内存一起使用.
> 请参阅[MVC应用程序模板文档](Startup-Templates/Mvc.md)以详细了解解决方案结构.
> 请参阅[应用程序模板文档](Startup-Templates/Application.md)以详细了解解决方案结构.
### 数据库连接字符串

2
docs/zh-Hans/Getting-Started-Console-Application.md

@ -121,4 +121,4 @@ namespace AbpConsoleDemo
### 源码
从[这里](../samples/BasicConsoleApplication)获取本教程中创建的示例项目的源代码.
从[这里](https://github.com/abpframework/abp/tree/dev/samples/BasicConsoleApplication)获取本教程中创建的示例项目的源代码.

54
docs/zh-Hans/Startup-Templates/Mvc.md → docs/zh-Hans/Startup-Templates/Application.md

@ -1,10 +1,8 @@
# MVC应用程序启动模板
# 应用程序启动模板
## 介绍
MVC应用程序启动模板是基于[领域驱动设计](../Domain-Driven-Design.md)(DDD)分层(或根据偏好分层)的应用程序结构.
在这篇文档中详细介绍了解决方案结构和项目
应用程序启动模板是基于[领域驱动设计](../Domain-Driven-Design.md)(DDD)分层的应用程序结构. 在这篇文档中详细介绍了解决方案结构和项目,如果你想快速入门,请遵循以下指南:
* 参阅[ASP.NET Core MVC 模板入门](../Getting-Started-AspNetCore-MVC-Template.md)创建此模板的新解决方案并运行它.
* 参阅[ASP.NET Core MVC 教程](../Tutorials/AspNetCore-Mvc/Part-I.md)学习使用此模板开发应用程序.
@ -22,11 +20,24 @@ dotnet tool install -g Volo.Abp.Cli
然后使用 `abp new` 命令在空文件夹中创建新解决方案:
````bash
abp new Acme.BookStore -t mvc
abp new Acme.BookStore -t app
````
* `Acme.BookStore` 是解决方案的名称, 如*YourCompany.YourProduct*. 你可以使用单级或多级名称.
* 示例中指定了启动模板 (`-t` 或 `--template` 选项). 不过 `mvc` 是默认模板,即使未指定也会创建 `MVC` 的模板项目.
* 示例中指定了启动模板 (`-t` 或 `--template` 选项). 示指定模板时,默认模板是`app` .
### 指定UI框架
模板提供了多个UI框架
* `mvc`: ASP.NET Core MVC Razor页面 (默认)
* `angular`: Angular UI
使用 `-u``--ui` 选择指定UI框架:
````bash
abp new Acme.BookStore -u angular
````
### 指定数据库提供程序
@ -41,23 +52,13 @@ abp new Acme.BookStore -t mvc
abp new Acme.BookStore -d mongodb
````
### 创建分层解决方案
使用 `--tiered` 选项创建分层解决方案, Web与WebApi层在物理上是分开的. 如果未指定,CLI会创建一个分层的解决方案,这个解决方案没有那么复杂,适合大多数场景.
````bash
abp new Acme.BookStore --tiered
````
有关分层的方法,请参阅下面的"分层结构"部分.
## 解决方案结构
根据命令的选项,会创建略有不同的解决方案结构.
### 默认结构
如果未指定选项,你会得到如下所示的解决方案:
如果未指定附加选项,你会得到如下所示的解决方案:
![bookstore-visual-studio-solution-v3](../images/bookstore-visual-studio-solution-v3.png)
@ -159,7 +160,7 @@ ABP有[动态 C# API 客户端](../AspNetCore/Dynamic-CSharp-API-Clients.md)功
#### .Web 项目
包含应用程序的用户界面(UI). 包括Razor页面,javascript文件,样式文件,图片等...
包含应用程序的用户界面(UI).如果使用ASP.NET Core MVC UI, 它包括Razor页面,javascript文件,样式文件,图片等...
包含应用程序主要的 `appsettings.json` 配置文件,用于配置数据库连接字符串和应用程序的其他配置
@ -180,10 +181,10 @@ ABP有[动态 C# API 客户端](../AspNetCore/Dynamic-CSharp-API-Clients.md)功
* `.Domain.Tests` 用于测试领域层.
* `.Application.Tests` 用于测试应用层.
* `.EntityFrameworkCore.Tests` 用于测试EF Core配置与自定义仓储.
* `.Web.Tests` 用于测试UI.
* `.Web.Tests` 用于测试UI(适用于ASP.NET Core MVC UI).
* `.TestBase` 所有测试项目的基础(共享)项目.
此外, `.HttpApi.Client.ConsoleTestApp` 是一个控制台应用程序(不是自动化测试项目),它用于演示DotNet应用程序中HTTP API的用法.
此外, `.HttpApi.Client.ConsoleTestApp` 是一个控制台应用程序(不是自动化测试项目),它用于演示.Net应用程序中HTTP API的用法.
测试项目是用于做集成测试的:
@ -201,7 +202,7 @@ ABP有[动态 C# API 客户端](../AspNetCore/Dynamic-CSharp-API-Clients.md)功
### 分层结构
如果你按上面的描述指定了 `--tiered` 选项,会创建分层解决方案. 分层结构的目的是**将Web应用程序和HTTP API部署到不同的服务器**:
如果你选择了ASP.NET Core UI并指定了 `--tiered` 选项,CLI会创建分层解决方案. 分层结构的目的是**将Web应用程序和HTTP API部署到不同的服务器**:
![tiered-solution-servers](../images/tiered-solution-servers.png)
@ -252,6 +253,17 @@ ABP使用开源的[IdentityServer4](https://identityserver.io/)框架做应用
* 然后运行`.HttpApi.Host`,因为`.Web`应用程序需要访问HTTI API.
* 最后运行`.Web`并登录到应用程序(用户名: `admin` 密码: `1q2w3E*`).
### Angular UI
如果你选择Angular做为UI框架(使用 `-u angular` 选择), 解决方案会被分成两个文件夹:
* `angular` 是客户端部分,文件夹中包含了Angular UI 解决方案.
* `aspnet-core` 是服务端部分,文件夹中包含了ASP.NET Core解决方案.
服务端部分与上面的描述的解决方案非常相似. `.HttpApi.Host` 项目提供API接口, Angular应用程序使用它提供的接口.
`angular/src/environments` 文件夹下的文件含有应用程序的基础配置.
## 下一步是什么?
* 参阅[ASP.NET Core MVC 模板入门](../Getting-Started-AspNetCore-MVC-Template.md)创建此模板的新解决方案并运行它.

4
docs/zh-Hans/Startup-Templates/Index.md

@ -4,5 +4,5 @@
单击下面列表中的名称以查看相关启动模板的文档:
* [**mvc**](Mvc.md): ASP.NET Core MVC应用程序模板.
* [**mvc-module**](Mvc-Module.md): ASP.NET Core MVC模块/服务模板.
* [**app**](Application.md): 应用程序模板.
* [**module**](Module.md): 模块/服务模板.

4
docs/zh-Hans/Startup-Templates/Mvc-Module.md → docs/zh-Hans/Startup-Templates/Module.md

@ -15,14 +15,14 @@ dotnet tool install -g Volo.Abp.Cli
然后使用 `abp new` 命令在空文件夹中创建新解决方案:
````bash
abp new Acme.IssueManagement -t mvc-module
abp new Acme.IssueManagement -t module
````
* `Acme.IssueManagement` 是解决方案的名称, 如*YourCompany.YourProduct*. 你可以使用单级或多级名称.
### 无用户界面
默认情况模板附带一个UI,你可以使用`--no-ui`选项指定不包含UI层.
默认情况模板附带一个MVC UI,你可以使用`--no-ui`选项指定不包含UI层.
````bash
abp new Acme.IssueManagement -t mvc-module --no-ui

10
docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-I.md

@ -10,7 +10,9 @@
- [Part II: 创建,编辑,删除书籍](Part-II.md)
- [Part III: 集成测试](Part-III.md)
你可以从[GitHub存储库](https://github.com/volosoft/abp/tree/master/samples/BookStore)访问应用程序的**源代码**.
你可以从[GitHub存储库](https://github.com/abpframework/abp/tree/master/samples/BookStore)访问应用程序的**源代码**.
> 你也可以观看由ABP社区成员为本教程录制的[视频课程](https://amazingsolutions.teachable.com/p/lets-build-the-bookstore-application).
### 创建项目
@ -22,7 +24,7 @@
![bookstore-visual-studio-solution](images/bookstore-visual-studio-solution-v3.png)
> 你可以查看[MVC应用程序模板文档](../../Startup-Templates/Mvc.md)以详细了解解决方案结构.但是,你将通过本教程了解基础知识.
> 你可以查看[应用程序模板文档](../../Startup-Templates/Application.md)以详细了解解决方案结构.但是,你将通过本教程了解基础知识.
### 创建Book实体
@ -99,7 +101,7 @@ public class BookStoreDbContext : AbpDbContext<BookStoreDbContext>
builder.Entity<Book>(b =>
{
b.ToTable(BookStoreConsts.DbTablePrefix + "Books", BookStoreConsts.DbSchema);
b.ConfigureAuditedAggregateRoot(); //auto configure for the base class props
b.ConfigureByConvention(); //auto configure for the base class props
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
});
````
@ -457,7 +459,7 @@ $(function () {
最终的页面如下:
![bookstore-book-list](images/bookstore-book-list.png)
![bookstore-book-list](images/bookstore-book-list-2.png)
### 下一章

4
docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-II.md

@ -10,11 +10,13 @@
你可以从[GitHub存储库](https://github.com/volosoft/abp/tree/master/samples/BookStore)访问应用程序的**源代码**.
> 你也可以观看由ABP社区成员为本教程录制的[视频课程](https://amazingsolutions.teachable.com/p/lets-build-the-bookstore-application).
### 新增 Book 实体
通过本节, 你将会了解如何创建一个 modal form 来实现新增书籍的功能. 最终成果如下图所示:
![bookstore-create-dialog](images/bookstore-create-dialog.png)
![bookstore-create-dialog](images/bookstore-create-dialog-2.png)
#### 新建 modal form

2
docs/zh-Hans/Tutorials/AspNetCore-Mvc/Part-III.md

@ -10,6 +10,8 @@
你可以从[GitHub存储库](https://github.com/volosoft/abp/tree/master/samples/BookStore)访问应用程序的**源代码**.
> 你也可以观看由ABP社区成员为本教程录制的[视频课程](https://amazingsolutions.teachable.com/p/lets-build-the-bookstore-application).
### 解决方案中的测试项目
解决方案中有多个测试项目:

BIN
docs/zh-Hans/images/bookstore-swagger-ui-host.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
docs/zh-Hans/images/bookstore-visual-studio-solution-for-spa.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

14
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HttpContextTenantResolveResultAccessor.cs

@ -7,17 +7,11 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
[Dependency(ReplaceServices = true)]
public class HttpContextTenantResolveResultAccessor : ITenantResolveResultAccessor, ITransientDependency
{
public const string HttpContextItemName = "__AbpTenantResolveResult";
public TenantResolveResult Result
{
get
{
if (_httpContextAccessor.HttpContext == null)
{
return null;
}
return _httpContextAccessor.HttpContext.Items[""] as TenantResolveResult;
}
get => _httpContextAccessor.HttpContext?.Items[HttpContextItemName] as TenantResolveResult;
set
{
if (_httpContextAccessor.HttpContext == null)
@ -25,7 +19,7 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
return;
}
_httpContextAccessor.HttpContext.Items[""] = value;
_httpContextAccessor.HttpContext.Items[HttpContextItemName] = value;
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj

@ -23,7 +23,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="3.1.5" />
</ItemGroup>
</Project>

2
framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="4.5.0" />
<PackageReference Include="Autofac" Version="4.9.2" />
<PackageReference Include="Autofac" Version="4.9.3" />
</ItemGroup>
<ItemGroup>

6
framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj

@ -12,13 +12,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.1.0" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="HtmlAgilityPack.NetCore" Version="1.5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="NuGet.Versioning" Version="5.1.0" />
<PackageReference Include="NuGet.Versioning" Version="5.2.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.2.1" />
</ItemGroup>
<ItemGroup>

2
framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj

@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.0.0" />
<PackageReference Include="Nito.AsyncEx.Context" Version="5.0.0" />
</ItemGroup>

2
framework/src/Volo.Abp.Emailing/Volo.Abp.Emailing.csproj

@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Scriban" Version="2.0.1" />
<PackageReference Include="Scriban" Version="2.1.0" />
</ItemGroup>
<ItemGroup>

4
framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
@ -18,7 +18,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.6" />
</ItemGroup>
</Project>

2
framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
</ItemGroup>
<ItemGroup>

4
framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj

@ -19,8 +19,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.6" />
</ItemGroup>
</Project>

16
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -494,24 +494,12 @@ namespace Volo.Abp.EntityFrameworkCore
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)))
{
/* This condition should normally be defined as below:
* !IsSoftDeleteFilterEnabled || !((ISoftDelete) e).IsDeleted
* But this causes a problem with EF Core (see https://github.com/aspnet/EntityFrameworkCore/issues/9502)
* So, we made a workaround to make it working. It works same as above.
*/
Expression<Func<TEntity, bool>> softDeleteFilter = e => !((ISoftDelete)e).IsDeleted || ((ISoftDelete)e).IsDeleted != IsSoftDeleteFilterEnabled;
expression = expression == null ? softDeleteFilter : CombineExpressions(expression, softDeleteFilter);
expression = e => !IsSoftDeleteFilterEnabled || !((ISoftDelete) e).IsDeleted;
}
if (typeof(IMultiTenant).IsAssignableFrom(typeof(TEntity)))
{
/* This condition should normally be defined as below:
* !IsMayHaveTenantFilterEnabled || ((IMayHaveTenant)e).TenantId == CurrentTenantId
* But this causes a problem with EF Core (see https://github.com/aspnet/EntityFrameworkCore/issues/9502)
* So, we made a workaround to make it working. It works same as above.
*/
Expression<Func<TEntity, bool>> multiTenantFilter = e => ((IMultiTenant)e).TenantId == CurrentTenantId || (((IMultiTenant)e).TenantId == CurrentTenantId) == IsMultiTenantFilterEnabled;
Expression<Func<TEntity, bool>> multiTenantFilter = e => !IsMultiTenantFilterEnabled || ((IMultiTenant) e).TenantId == CurrentTenantId;
expression = expression == null ? multiTenantFilter : CombineExpressions(expression, multiTenantFilter);
}

2
framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.3" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.6" />
</ItemGroup>
<ItemGroup>

4
framework/test/AbpTestBase/AbpTestBase.csproj

@ -15,8 +15,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="NSubstitute" Version="4.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />

2
framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.AspNetCore.Authentication.OAuth\Volo.Abp.AspNetCore.Authentication.OAuth.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Tests\Volo.Abp.AspNetCore.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj

@ -21,7 +21,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
<ItemGroup>

2
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj

@ -20,7 +20,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Tests\Volo.Abp.AspNetCore.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
<!-- Below ItemGroup and Target tags are added according to https://github.com/aspnet/Hosting/issues/959#issuecomment-286351703 -->

2
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj

@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
<ItemGroup>

2
framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj

@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
<ItemGroup>

2
framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.AspNetCore.TestBase\Volo.Abp.AspNetCore.TestBase.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Auditing\Volo.Abp.Auditing.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Authorization\Volo.Abp.Authorization.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj

@ -15,7 +15,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\Volo.Abp.Core.Tests\Volo.Abp.Core.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.BackgroundJobs\Volo.Abp.BackgroundJobs.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Caching\Volo.Abp.Caching.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.Castle.Core\Volo.Abp.Castle.Core.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj

@ -9,7 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Cli.Core\Volo.Abp.Cli.Core.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Core\Volo.Abp.Core.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

4
framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj

@ -17,8 +17,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Data\Volo.Abp.Data.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj

@ -21,7 +21,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Emailing\Volo.Abp.Emailing.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

4
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj

@ -20,8 +20,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj

@ -17,7 +17,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.EventBus\Volo.Abp.EventBus.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Features\Volo.Abp.Features.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj

@ -15,7 +15,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.FluentValidation\Volo.Abp.FluentValidation.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj

@ -15,7 +15,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.Tests\Volo.Abp.AspNetCore.Mvc.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
<ItemGroup>

2
framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj

@ -18,7 +18,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj

@ -14,7 +14,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.MailKit\Volo.Abp.MailKit.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.MemoryDb\Volo.Abp.MemoryDb.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\Volo.Abp.TestApp\Volo.Abp.TestApp.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj

@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="Mongo2Go" Version="2.2.11" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.MultiTenancy\Volo.Abp.MultiTenancy.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.Security\Volo.Abp.Security.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Serialization\Volo.Abp.Serialization.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Settings\Volo.Abp.Settings.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Specifications\Volo.Abp.Specifications.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj

@ -13,7 +13,7 @@
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.MemoryDb.Tests\Volo.Abp.MemoryDb.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj

@ -18,7 +18,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.TestBase\Volo.Abp.TestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Specifications\Volo.Abp.Specifications.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.UI.Navigation\Volo.Abp.UI.Navigation.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Uow\Volo.Abp.Uow.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj

@ -15,7 +15,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Validation\Volo.Abp.Validation.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

2
framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj

@ -18,7 +18,7 @@
<ItemGroup>
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
</ItemGroup>
</Project>

5
samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.MongoDB.Tests/MongoDb/BookStoreMongoDbTestModule.cs

@ -1,4 +1,5 @@
using Mongo2Go;
using System;
using Mongo2Go;
using Volo.Abp;
using Volo.Abp.Data;
using Volo.Abp.Modularity;
@ -19,7 +20,7 @@ namespace Acme.BookStore.MongoDB
Configure<DbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString + "|BookStore";
options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString.EnsureEndsWith('/') + "BookStore";
});
}

2
templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs

@ -34,7 +34,7 @@ namespace MyCompanyName.MyProjectName.Web
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyProjectNameWebModule>("MyCompanyName.MyProjectName");
options.FileSets.AddEmbedded<MyProjectNameWebModule>("MyCompanyName.MyProjectName.Web");
});
Configure<AbpAutoMapperOptions>(options =>

5
templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MongoDB/MyProjectNameMongoDbTestModule.cs

@ -1,4 +1,5 @@
using Mongo2Go;
using System;
using Mongo2Go;
using Volo.Abp;
using Volo.Abp.Data;
using Volo.Abp.Modularity;
@ -19,7 +20,7 @@ namespace MyCompanyName.MyProjectName.MongoDB
Configure<DbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString + "|MyProjectName";
options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString.EnsureEndsWith('/') + "MyProjectName";
});
}

Loading…
Cancel
Save