Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/abpframework/abp
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyunchong committed Sep 6, 2019
2 parents 08c31f0 + 90fb140 commit 54d52f0
Show file tree
Hide file tree
Showing 70 changed files with 1,220 additions and 1,243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"Volo.AbpIo.Domain:010008": "Allowed Developer Count can not be less then current developer count!",
"Volo.AbpIo.Domain:010009": "Allowed Developer Count can not be less then 0!",
"Volo.AbpIo.Domain:010010": "Maximum mac address count is exceeded!",
"Volo.AbpIo.Domain:010011": "Personal license can't have more than 1 developer!",
"Volo.AbpIo.Domain:010012": "License can't be extended one month after license expires!",
"Volo.AbpIo.Domain:020001": "Could not delete this NPM Package because \"{NugetPackages}\" Nuget Packages are dependent to this package.",
"Volo.AbpIo.Domain:020002": "Could not delete this NPM Package because \"{Modules}\" Modules are using this package.",
"Volo.AbpIo.Domain:020003": "Could not delete this NPM Package because \"{Modules}\" Modules are using this package and \"{NugetPackages}\" Nuget Packages are dependent to this package.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"Volo.AbpIo.Domain:010007": "Bu kullanıcı zaten bu organizasyonda yazılımcı olarak var!",
"Volo.AbpIo.Domain:010008": "Maksimum izin verilen kullanıcı sayısı mevcut kullanıcı sayısından az olamaz!",
"Volo.AbpIo.Domain:010009": "Maksimum izin verilen kullanıcı sayısı sıfırdan az olamaz!",
"Volo.AbpIo.Domain:010010": "Maksimum mac adresi sayısı geçildi!"
"Volo.AbpIo.Domain:010010": "Maksimum mac adresi sayısı geçildi!",
"Volo.AbpIo.Domain:010011": "Bireysel lisans birden fazla geliştiriciye sahip olamaz!",
"Volo.AbpIo.Domain:010012": "Lisans, lisans süresi bittikten bir ay sonra uzatılamaz!",
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"Manage": "Manage",
"StartDate": "Start date",
"EndDate": "End date",
"Modules": "Modules"
"Modules": "Modules",
"LicenseExtendMessage": "Your license end date is extended to {0}",
"LicenseUpgradeMessage": "Your license is upgraded to {0}",
"LicenseAddDeveloperMessage": "{0} developers added to your license"
}
}
8 changes: 4 additions & 4 deletions docs/en/Application-Services.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public interface IBookAppService : IApplicationService
`BookDto` is a simple [DTO](Data-Transfer-Objects.md) class defined as below:

````csharp
[AutoMapFrom(typeof(Book))] //Defines the mapping
[AbpAutoMapFrom(typeof(Book))] //Defines the mapping
public class BookDto
{
public Guid Id { get; set; }
Expand All @@ -159,7 +159,7 @@ public class BookDto
}
````

* `BookDto` defines `[AutoMapFrom(typeof(Book))]` attribute to create the object mapping from `Book` to `BookDto`.
* `BookDto` defines `[AbpAutoMapFrom(typeof(Book))]` attribute to create the object mapping from `Book` to `BookDto`.

Then you can implement the `GetAsync` method as shown below:

Expand Down Expand Up @@ -248,7 +248,7 @@ public interface IAsyncCrudAppService<
DTO classes used in this example are `BookDto` and `CreateUpdateBookDto`:

````csharp
[AutoMapFrom(typeof(Book))]
[AbpAutoMapFrom(typeof(Book))]
public class BookDto : AuditedEntityDto<Guid>
{
public string Name { get; set; }
Expand All @@ -258,7 +258,7 @@ public class BookDto : AuditedEntityDto<Guid>
public float Price { get; set; }
}

[AutoMapTo(typeof(Book))]
[AbpAutoMapTo(typeof(Book))]
public class CreateUpdateBookDto
{
[Required]
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Best-Practices/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Also, this guide is mostly usable for general **application development**.
* [Data Transfer Objects](Data-Transfer-Objects.md)
* Data Access
* [Entity Framework Core Integration](Entity-Framework-Core-Integration.md)
* [MongoDB Integration](MongoDB-Integration.md)
* [MongoDB Integration](MongoDB-Integration.md)

35 changes: 35 additions & 0 deletions docs/en/Best-Practices/PostgreSQL-Integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Entity Framework Core PostgreSQL Integration

> See [Entity Framework Core Integration document](../Entity-Framework-Core.md) for the basics of the EF Core integration.
### EntityFrameworkCore Project Update

- In `Acme.BookStore.EntityFrameworkCore` project replace package `Volo.Abp.EntityFrameworkCore.SqlServer` with `Volo.Abp.EntityFrameworkCore.PostgreSql`
- Update to use PostgreSQL in `BookStoreEntityFrameworkCoreModule`
- Replace the `AbpEntityFrameworkCoreSqlServerModule` with the `AbpEntityFrameworkCorePostgreSqlModule`
- Replace the `options.UseSqlServer()` with the `options.UsePostgreSql()`
- In other projects update the PostgreSQL connection string in necessary `appsettings.json` files

#### Delete Existing Migrations

Delete all existing migration files (including `DbContextModelSnapshot`)

![postgresql-delete-initial-migrations](images/postgresql-delete-initial-migrations.png)

#### Regenerate Initial Migration & Update the Database

Set the correct startup project (usually a web project),
Open the **Package Manager Console** (Tools -> Nuget Package Manager -> Package Manager Console), select the `Acme.BookStore.EntityFrameworkCore.DbMigrations` as the **Default project** and execute the following command:

Run `Add-Migration` command.
````
PM> Add-Migration Initial
````

Then execute the `Update-Database` command to update the database schema:

````
PM> Update-Database
````

![postgresql-update-database](images/postgresql-update-database.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions docs/en/Dapper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Dapper Integration

Because Dapper's idea is that the sql statement takes precedence, and mainly provides some extension methods for the `IDbConnection` interface.

Abp does not encapsulate too many functions for Dapper. Abp Dapper provides a `DapperRepository<TDbContext>` base class based on Abp EntityFrameworkCore, which provides the `IDbConnection` and `IDbTransaction` properties required by Dapper.

These two properties can work well with [Unit-Of-Work](Unit-Of-Work.md).

## Installation

Please install and configure EF Core according to [EF Core's integrated documentation](Entity-Framework-Core.md).

`Volo.Abp.Dapper` is the main nuget package for the Dapper integration. Install it to your project (for a layered application, to your data/infrastructure layer):

```shell
Install-Package Volo.Abp.Dapper
```

Then add `AbpDapperModule` module dependency (`DependsOn` attribute) to your [module](Module-Development-Basics.md):

````C#
using Volo.Abp.Dapper;
using Volo.Abp.Modularity;

namespace MyCompany.MyProject
{
[DependsOn(typeof(AbpDapperModule))]
public class MyModule : AbpModule
{
//...
}
}
````

## Implement Dapper Repository

The following code implements the `Person` repository, which requires EF Core's `DbContext` (MyAppDbContext). You can inject `PersonDapperRepository` to call its methods.

`DbConnection` and `DbTransaction` are from the `DapperRepository` base class.

```C#
public class PersonDapperRepository : DapperRepository<MyAppDbContext>, ITransientDependency
{
public PersonDapperRepository(IDbContextProvider<MyAppDbContext> dbContextProvider)
: base(dbContextProvider)
{
}

public virtual async Task<List<string>> GetAllPersonNames()
{
return (await DbConnection.QueryAsync<string>("select Name from People", transaction: DbTransaction))
.ToList();
}

public virtual async Task<int> UpdatePersonNames(string name)
{
return await DbConnection.ExecuteAsync("update People set Name = @NewName", new { NewName = name },
DbTransaction);
}
}
```
2 changes: 1 addition & 1 deletion docs/en/Startup-Templates/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abp new Acme.IssueManagement -t module
The template comes with an MVC UI by default. You can use `--no-ui` option to not include the UI layer.

````bash
abp new Acme.IssueManagement -t mvc-module --no-ui
abp new Acme.IssueManagement -t module --no-ui
````

## Solution Structure
Expand Down
12 changes: 11 additions & 1 deletion docs/en/docs-nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,21 @@
"items": [
{
"text": "Entity Framework Core Integration",
"path": "Entity-Framework-Core.md"
"path": "Entity-Framework-Core.md",
"items": [
{
"text": "PostgreSQL Integration",
"path": "Best-Practices/PostgreSQL-Integration.md"
}
]
},
{
"text": "MongoDB Integration",
"path": "MongoDB.md"
},
{
"text": "Dapper Integration",
"path": "Dapper.md"
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions docs/zh-Hans/Application-Services.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public interface IBookAppService : IApplicationService
`BookDto`是一个简单的[DTO](Data-Transfer-Objects.md)类, 定义如下:

````csharp
[AutoMapFrom(typeof(Book))] //Defines the mapping
[AbpAutoMapFrom(typeof(Book))] //Defines the mapping
public class BookDto
{
public Guid Id { get; set; }
Expand All @@ -159,7 +159,7 @@ public class BookDto
}
````

* `BookDto`定义了`[AutoMapFrom(typeof(Book))]`属性来从创建对象映射Book到BookDto.
* `BookDto`定义了`[AbpAutoMapFrom(typeof(Book))]`属性来从创建对象映射Book到BookDto.

然后你可以实现`GetAsync`方法. 如下所示:

Expand Down Expand Up @@ -247,7 +247,7 @@ public interface IAsyncCrudAppService<
示例中使用的DTO类是`BookDto``CreateUpdateBookDto`:

````csharp
[AutoMapFrom(typeof(Book))]
[AbpAutoMapFrom(typeof(Book))]
public class BookDto : AuditedEntityDto<Guid>
{
public string Name { get; set; }
Expand All @@ -257,7 +257,7 @@ public class BookDto : AuditedEntityDto<Guid>
public float Price { get; set; }
}

[AutoMapTo(typeof(Book))]
[AbpAutoMapTo(typeof(Book))]
public class CreateUpdateBookDto
{
[Required]
Expand Down
35 changes: 35 additions & 0 deletions docs/zh-Hans/Best-Practices/PostgreSQL-Integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Entity Framework Core PostgreSQL 集成

> 参阅 [Entity Framework Core 集成文档](../Entity-Framework-Core.md) 了解集成EF Core的基础知识.
### 更新 EntityFrameworkCore 项目

-`Acme.BookStore.EntityFrameworkCore` 中将包 `Volo.Abp.EntityFrameworkCore.SqlServer` 替换为 `Volo.Abp.EntityFrameworkCore.PostgreSql`
- 打开 `BookStoreEntityFrameworkCoreModule` 模块类
-`AbpEntityFrameworkCoreSqlServerModule` 替换为 `AbpEntityFrameworkCorePostgreSqlModule`
-`options.UseSqlServer()` 替换为 `options.UsePostgreSql()`
- 在其他的项目中将 `appsetting.json` 文件中的连接字符串更新为PostgreSQL链接字符串

#### 删除现有迁移

删除所有的现有迁移文件 (包括 `DbContextModelSnapshot`)

![postgresql-delete-initial-migrations](images/postgresql-delete-initial-migrations.png)

#### 生成生成迁移并更新数据库

设置正确的启动项目 (通常是Web项目),
打开 **程序包管理器控制台** (工具 -> Nuget包管理器 -> 程序包管理器控制台), 选择 `Acme.BookStore.EntityFrameworkCore.DbMigrations` 做为 **默认项目** 并执行以下命令:

运行 `Add-Migration` 命令.
````
PM> Add-Migration Initial
````

然后执行 `Update-Database` 执行更新数据库:

````
PM> Update-Database
````

![postgresql-update-database](images/postgresql-update-database.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions docs/zh-Hans/Blog-Posts/2019-08-16 v0_19_Release/Post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 发布ABP v0.19包含Angular UI选项

ABP v0.19已发布,包含解决的[~90个问题](https://github.com/abpframework/abp/milestone/17?closed=1)[600+次提交](https://github.com/abpframework/abp/compare/0.18.1...0.19.0).

## 新功能

### Angular UI

终于,ABP有了一个**SPA UI**选项,使用最新的[Angular](https://angular.io/)框架.Angular的集成不是简单地创建了一个启动模板.

* 创建了一个基础架构来处理ABP的模块化,主题和其他一些功能.此基础结构已部署为[NPM包](https://github.com/abpframework/abp/tree/dev/npm/ng-packs/packages).
* 为帐户,身份和租户管理等模块创建了Angular UI包.
* 创建了一个最小的启动模板,使用IdentityServer进行身份验证并使用ASP.NET Core做为后端.此模板使用上面提到的包.
* 更新了[ABP CLI](https://docs.abp.io/en/abp/latest/CLI)[下载页面](https://abp.io/get-started),以便能够使用新的UI选项生成项目.
* 创建了[教程](https://docs.abp.io/en/abp/latest/Tutorials/Angular/Part-I)以使用新的UI选项快速入门.

我们基于最新的Angular工具和趋势创建了模板,文档和基础架构:

* 使用[NgBootstrap](https://ng-bootstrap.github.io/)[PrimeNG](https://www.primefaces.org/primeng/)作为UI组件库.你可以使用自己喜欢的库,没问题,但预构建的模块可以使用这些库.
* 使用[NGXS](https://ngxs.gitbook.io/ngxs/)作为状态管理库.

Angular是第一个SPA UI选项,但它不是最后一个.在v1.0发布之后,我们将开始第二个UI选项的工作.虽然尚未决定,但候选的有Blazor,React和Vue.js. 等待你的反馈.你可以使用以下issue进行投票(thumb):

* [Blazor](https://github.com/abpframework/abp/issues/394)
* [Vue.js](https://github.com/abpframework/abp/issues/1168)
* [React](https://github.com/abpframework/abp/issues/1638)

### Widget系统

[Widget系统](https://docs.abp.io/en/abp/latest/AspNetCore/Widgets)允许为ASP.NET Core MVC应用程序**定义和重用**Widget.Widget可能有自己的脚本和样式资源以及由ABP框架管理的第三方库的依赖关系.

### 其他

我们已经解决了许多错误,并根据社区反馈开发了现有功能.有关所有已结束的问题,请参阅[v0.19里程碑](https://github.com/abpframework/abp/milestone/17?closed=1).

## 路线图

我们决定等待**ASP.NET Core 3.0**最终发布.微软已宣布将于9月23日至25日在[.NET Conf](https://www.dotnetconf.net/)上发布它.

我们已经计划完成我们的工作,并迁移到ASP.NET Core 3.0(预览版或RC版)在它发布之前.一旦Microsoft发布它,我们将立即开始升级并测试最终版本.

因此,你可以期待ABP **v1.0**将在**10月上半月**发布.我们非常兴奋并努力地工作着.

你可以关注[GitHub里程碑](https://github.com/abpframework/abp/milestones)的进度.

我们不会在v1.0之前添加主要功能.
19 changes: 12 additions & 7 deletions docs/zh-Hans/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,20 @@ abp new Acme.BookStore

#### Options

* `--template``-t`: 指定模板. 默认的模板是 `mvc`.可用的模板有:
* `mvc` (默认): ASP.NET Core [MVC应用程序模板](Startup-Templates/Mvc.md). 其他选项:
* `--database-provider``-d`: 指定数据库提供程序. 默认提供程序是 `ef`. 可用的提供程序有:
* `--template` 或者 `-t`: 指定模板. 默认的模板是 `app`,会生成web项目.可用的模板有:
* `app` (default): [应用程序模板](Startup-Templates/Application.md)。 其他选项:
* `--ui` 或者 `-u`: 指定ui框架。默认`mvc`框架。其他选项:
* `mvc`: ASP.NET Core MVC。此模板的其他选项:
* `--tiered`: 创建分层解决方案,Web和Http Api层在物理上是分开的。如果未指定会创建一个分层的解决方案,此解决方案没有那么复杂,适合大多数场景。
* `angular`: Angular. 这个模板还有一些额外的选项:
* `--separate-identity-server`: Separates the identity server application from the API host application. If not specified, you will have a single endpoint in the server side.
* `--database-provider` 或者 `-d`: 指定数据库提供程序。默认是 `ef`。其他选项:
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
* `--tiered`: 创建分层解决方案,Web和Http Api层在物理上是分开的. 如果未指定会创建一个分层的解决方案, 此解决方案没有那么复杂,适合大多数场景.
* `module`: [模块模板](Startup-Templates/Module.md). 其他选项:
* `--no-ui`: 不包含UI. 仅创建服务模块 (也称为微服务 - 没有UI).
* `--output-folder` `-o`: 指定输出文件夹,默认是当前目录.
* `module`: [Module template](Startup-Templates/Module.md). 其他选项:
* `--no-ui`: 不包含UI。仅创建服务模块(也称为微服务 - 没有UI)。
* `--output-folder` 或者 `-o`: 指定输出文件夹,默认是当前目录。
* `--version` 或者 `-v`: 指定ABP和模板的版本。它可以是 [release tag](https://github.com/abpframework/abp/releases) 或者 [branch name](https://github.com/abpframework/abp/branches). 如果没有指定,则使用最新版本。大多数情况下,您会希望使用最新的版本。

### add-package

Expand Down
Loading

0 comments on commit 54d52f0

Please sign in to comment.