Merge remote-tracking branch 'upstream/master' into Translate

pull/902/head
LiangShiWei 7 years ago
commit 5c355c9434

@ -1,6 +1,6 @@
# Getting Started ABP With AspNet Core MVC Web Application
This tutorial explains how to start ABP from scratch with minimal dependencies. You generally want to start with a **[startup template](https://abp.io/Templates)**.
This tutorial explains how to start ABP from scratch with minimal dependencies. You generally want to start with the **[startup template](Getting-Started-AspNetCore-MVC-Template.md)**.
## Create A New Project

@ -1,5 +1,7 @@
## ASP.NET Core MVC Template
This tutorials explains how to create a new ASP.NET Core MVC web application using the startup template, configure and run it.
### Creating a new project
Go to [the template creation page](https://abp.io/Templates), enter a project name and create your project as shown below:

@ -1,64 +1,30 @@
# ABP Documentation
* Getting Started
* From Startup Templates
* [ASP.NET Core MVC Template](Getting-Started-AspNetCore-MVC-Template.md)
* From Empty Projects
* [With Console Application](Getting-Started-Console-Application.md)
* [With ASP.NET Core Web Application](Getting-Started-AspNetCore-Application.md)
* Tutorials
* Application Development
* [With ASP.NET Core MVC](Tutorials/AspNetCore-Mvc/Part-I.md)
* Fundamentals
* [Dependency Injection](Dependency-Injection.md)
* [AutoFac Integration](Autofac-Integration.md)
* [Virtual File System](Virtual-File-System.md)
* [Localization](Localization.md)
* [Exception Handling](Exception-Handling.md)
* Validation
* Authorization
* Caching
* Auditing
* Setting Management
* Object to Object Mapping
* AutoMapper Integration
* Events
* Event Bus (local)
* Distributed Event Bus
* RabbitMQ Integration
* Services
* Object Serialization
* JSON Serialization
* Emailing
* GUIDs
* Threading
* Timing
* [Multi Tenancy](Multi-Tenancy.md)
* Module Development
* [Basics](Module-Development-Basics.md)
* Plug-In Modules
* [Best Practices](Best-Practices/Index.md)
* Domain Driven Design
* Domain Layer
* [Entities & Aggregate Roots](Entities.md)
* Value Objects
* [Repositories](Repositories.md)
* Domain Services
* Specifications
* Application Layer
* Application Services
* Data Transfer Objects
* Unit Of Work
* ASP.NET Core MVC
* API Versioning
* User Interface
* [Client Side Package Management](AspNetCore/Client-Side-Package-Management.md)
* [Bundling & Minification](AspNetCore/Bundling-Minification.md)
* [Tag Helpers](Tag-Helpers.md)
* [Theming](AspNetCore/Theming.md)
* Data Access
* [Entity Framework Core Integration](Entity-Framework-Core.md)
* [MongoDB Integration](MongoDB.md)
* Background
* [Background Jobs](Background-Jobs.md)
* Testing
ABP is an **open source application framework** focused on ASP.NET Core based web application development, but also supports developing other types of applications.
Explore the left navigation menu to deep dive in the documentation.
## Project Status
ABP is the **next generation** of the open source [ASP.NET Boilerplate](https://aspnetboilerplate.com/) framework. It's currently in early preview stage and not ready to use in production. The documentation is in progress and currently is very incomplete.
For short-term and production applications, it's suggested to use the [ASP.NET Boilerplate](https://aspnetboilerplate.com/) framework which is feature rich, mature, maintained and up-to-date.
## Getting Started
Easiest way to start a new project with ABP is to use the Startup templates:
* [ASP.NET Core MVC Template](Getting-Started-AspNetCore-MVC-Template.md)
If you want to start from scratch (with an empty project) then manually install the ABP framework, use following tutorials:
* [Console Application](Getting-Started-Console-Application.md)
* [ASP.NET Core Web Application](Getting-Started-AspNetCore-Application.md)
## Source Code
ABP is being developed on GitHub. See [the source code](https://github.com/abpframework/abp).
## Want to Contribute?
ABP is a community-driven open source project. See [the contribution guide](Contribution/Index.md) if you want to be a part of this project.

@ -1,10 +1,10 @@
## Module Development
# Module Development
### Introduction
## Introduction
ABP is itself a modular framework. It also provides an infrastructure and architectural model to develop your own modules.
ABP is a **modular application framework** which consists of dozens of **nuget packages**. It also provides a complete infrastructure to build your own application modules which may have entities, services, database integration, APIs, UI components and so on.
### Module Class
## Module Class
Every module should define a module class. The simplest way of defining a module class is to create a class derived from ``AbpModule`` as shown below:
@ -16,9 +16,9 @@ public class BlogModule : AbpModule
````
#### Configuring Dependency Injection & Other Modules
### Configuring Dependency Injection & Other Modules
##### ConfigureServices Method
#### ConfigureServices Method
``ConfigureServices`` is the main method to add your services to the dependency injection system and configure other modules. Example:
@ -52,15 +52,15 @@ public class BlogModule : AbpModule
See Configuration (TODO: link) document for more about the configuration system.
##### Pre & Post Configure Services
#### Pre & Post Configure Services
``AbpModule`` class also defines ``PreConfigureServices`` and ``PostConfigureServices`` methods to override and write your code just before and just after ``ConfigureServices``. Notice that the code you have written into these methods will be executed before/after the ``ConfigureServices`` methods of all other modules.
#### Application Initialization
### Application Initialization
Once all the services of all modules are configured, the application starts by initializing all modules. In this phase, you can resolve services from ``IServiceProvider`` since it's ready and available.
##### OnApplicationInitialization Method
#### OnApplicationInitialization Method
You can override ``OnApplicationInitialization`` method to execute code while application is being started. Example:
@ -102,15 +102,15 @@ public class AppModule : AbpModule
You can also perform startup logic if your module requires it
##### Pre & Post Application Initialization
#### Pre & Post Application Initialization
``AbpModule`` class also defines ``OnPreApplicationInitialization`` and ``OnPostApplicationInitialization`` methods to override and write your code just before and just after ``OnApplicationInitialization``. Notice that the code you have written into these methods will be executed before/after the ``OnApplicationInitialization`` methods of all other modules.
#### Application Shutdown
### Application Shutdown
Lastly, you can override ``OnApplicationShutdown`` method if you want to execute some code while application is beign shutdown.
Lastly, you can override ``OnApplicationShutdown`` method if you want to execute some code while application is being shutdown.
### Module Dependencies
## Module Dependencies
In a modular application, it's not unusual for one module to depend upon another module(s). An Abp module must declare ``[DependsOn]`` attribute if it does have a dependcy upon another module, as shown below:
@ -126,3 +126,10 @@ public class BlogModule
You can use multiple ``DependsOn`` attribute or pass multiple module types to a single ``DependsOn`` attribute depending on your preference.
A depended module may depend on another module, but you only need to define your direct dependencies. ABP investigates the dependency graph for the application at startup and initializes/shutdowns modules in the correct order.
## Framework Modules vs Application Modules
There are **two types of modules.** They don't have any structural difference but categorized by functionality and purpose:
- **Framework modules**: These are **core modules of the framework** like caching, emailing, theming, security, serialization, validation, EF Core integration, MongoDB integration... etc. They do not have application/business functionalities but makes your daily development easier by providing common infrastructure, integration and abstractions.
- **Application modules**: These modules implement **specific application/business functionalities** like blogging, document management, identity management, tenant management... etc. They generally have their own entities, services, APIs and UI components. See [pre-built application modules](Modules/Index.md).

@ -0,0 +1,9 @@
# Docs Module
Docs module is used to create technical documentation pages. ABP's [own documentation](https://abp.io/documents/) already using this module.
> Docs module follows the [module architecture best practices](../Best-Practices/Module-Architecture.md) guide.
## Installation
TODO...

@ -0,0 +1,26 @@
# Application Modules
ABP is a **modular application framework** which consists of dozens of **nuget packages**. It also provides a complete infrastructure to build your own application modules which may have entities, services, database integration, APIs, UI components and so on.
There are **two types of modules.** They don't have any structural difference but categorized by functionality and purpose:
* [**Framework modules**](https://github.com/abpframework/abp/tree/master/framework/src): These are **core modules of the framework** like caching, emailing, theming, security, serialization, validation, EF Core integration, MongoDB integration... etc. They do not have application/business functionalities but makes your daily development easier by providing common infrastructure, integration and abstractions.
* [**Application modules**](https://github.com/abpframework/abp/tree/master/modules): These modules implement specific application/business functionalities like blogging, document management, identity management, tenant management... etc. They generally have their own entities, services, APIs and UI components.
## Open Source Application Modules
There are some **free and open source** application modules developed and maintained by the ABP community:
* **Account**: Used to make user login/register to the application.
* **Audit Logging**: Used to persist audit logs to a database.
* **Background Jobs**: Used to persist background jobs when using default background job manager.
* **Blogging**: Used to create fancy blogs. ABP's [own blog](https://abp.io/blog/abp/) already using this module.
* [**Docs**](Docs.md): Used to create technical documentation pages. ABP's [own documentation](https://abp.io/documents/) already using this module.
* **Identity**: Used to manage roles, users and their permissions.
* **Identity Server**: Integrates to IdentityServer4.
* **Permission Management**: Used to persist permissions.
* **Setting Management**: Used to persist settings.
* **Tenant Management**: Used to manage tenants for a [multi-tenant](../Multi-Tenancy.md) application.
* **Users**: Used the abstract users, so other modules can depend on this instead of the Identity module.
Documenting the modules is in the progress. See [this repository](https://github.com/abpframework/abp/tree/master/modules) for source code of all modules.

@ -246,6 +246,10 @@
}
]
},
{
"text": "Application Modules",
"path": "Modules/Index.md"
},
{
"text": "Testing"
},

@ -39,8 +39,8 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
b.Property(x => x.UserName).HasMaxLength(AuditLogConsts.MaxUserNameLength).HasColumnName(nameof(AuditLog.UserName));
b.Property(x => x.TenantId).HasColumnName(nameof(AuditLog.TenantId));
b.HasMany<AuditLogAction>().WithOne().HasForeignKey(x => x.AuditLogId);
b.HasMany<EntityChange>().WithOne().HasForeignKey(x => x.AuditLogId);
b.HasMany(a => a.Actions).WithOne().HasForeignKey(x => x.AuditLogId).IsRequired();
b.HasMany(a => a.EntityChanges).WithOne().HasForeignKey(x => x.AuditLogId).IsRequired();
b.HasIndex(x => new { x.TenantId, x.ExecutionTime });
b.HasIndex(x => new { x.TenantId, x.UserId, x.ExecutionTime });

@ -10,7 +10,7 @@ using MyCompanyName.MyProjectName.DemoApp;
namespace MyCompanyName.MyProjectName.DemoApp.Migrations
{
[DbContext(typeof(DemoAppDbContext))]
[Migration("20181212114934_Initial")]
[Migration("20181218134206_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

@ -33,4 +33,8 @@
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Migrations\20181212114934_Initial.cs" />
</ItemGroup>
</Project>

@ -11,7 +11,7 @@ using Volo.Abp.BackgroundJobs;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(MyProjectNameDbContext))]
[Migration("20181212113826_Initial")]
[Migration("20181218134025_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -101,8 +101,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
@ -130,8 +128,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
@ -145,8 +141,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
@ -173,8 +167,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
@ -608,25 +600,17 @@ namespace MyCompanyName.MyProjectName.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>

@ -12,6 +12,7 @@ namespace MyCompanyName.MyProjectName.Migrations
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
UserId = table.Column<Guid>(nullable: true),
UserName = table.Column<string>(maxLength: 256, nullable: true),
@ -27,8 +28,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Url = table.Column<string>(maxLength: 256, nullable: true),
Exceptions = table.Column<string>(maxLength: 4000, nullable: true),
Comments = table.Column<string>(maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(nullable: true),
ExtraProperties = table.Column<string>(nullable: true)
HttpStatusCode = table.Column<int>(nullable: true)
},
constraints: table =>
{
@ -173,8 +173,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Parameters = table.Column<string>(maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(nullable: false),
ExecutionDuration = table.Column<int>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
AuditLogId1 = table.Column<Guid>(nullable: true)
ExtraProperties = table.Column<string>(nullable: true)
},
constraints: table =>
{
@ -185,12 +184,6 @@ namespace MyCompanyName.MyProjectName.Migrations
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId1",
column: x => x.AuditLogId1,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
@ -204,8 +197,7 @@ namespace MyCompanyName.MyProjectName.Migrations
ChangeType = table.Column<byte>(nullable: false),
EntityId = table.Column<string>(maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
AuditLogId1 = table.Column<Guid>(nullable: true)
ExtraProperties = table.Column<string>(nullable: true)
},
constraints: table =>
{
@ -216,12 +208,6 @@ namespace MyCompanyName.MyProjectName.Migrations
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId1",
column: x => x.AuditLogId1,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
@ -368,11 +354,6 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpAuditLogActions",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId1",
table: "AbpAuditLogActions",
column: "AuditLogId1");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime",
table: "AbpAuditLogActions",
@ -398,11 +379,6 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpEntityChanges",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_AuditLogId1",
table: "AbpEntityChanges",
column: "AuditLogId1");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId",
table: "AbpEntityChanges",

@ -99,8 +99,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
@ -128,8 +126,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
@ -143,8 +139,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
@ -171,8 +165,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
@ -606,25 +598,17 @@ namespace MyCompanyName.MyProjectName.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>

@ -7,6 +7,8 @@
<ItemGroup>
<Compile Remove="Migrations\20181114070127_Initial.cs" />
<Compile Remove="Migrations\20181212113826_Initial.cs" />
<Compile Remove="Migrations\20181218133646_Remove_Duplicate_AuditLogId1.cs" />
</ItemGroup>
<ItemGroup>

@ -25,4 +25,8 @@
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Migrations\20181212121034_Initial.cs" />
</ItemGroup>
</Project>

@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace IdentityServerHost.Migrations
{
[DbContext(typeof(DemoAppDbContext))]
[Migration("20181212121034_Initial")]
[Migration("20181218135354_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

@ -10,7 +10,7 @@ using MyCompanyName.MyProjectName.Host;
namespace MyCompanyName.MyProjectName.Host.Migrations
{
[DbContext(typeof(DemoAppDbContext))]
[Migration("20181212121232_Initial")]
[Migration("20181218135310_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -100,8 +100,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
@ -129,8 +127,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
@ -144,8 +140,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
@ -172,8 +166,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
@ -272,25 +264,17 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>

@ -77,8 +77,7 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
Parameters = table.Column<string>(maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(nullable: false),
ExecutionDuration = table.Column<int>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
AuditLogId1 = table.Column<Guid>(nullable: true)
ExtraProperties = table.Column<string>(nullable: true)
},
constraints: table =>
{
@ -89,12 +88,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId1",
column: x => x.AuditLogId1,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
@ -108,8 +101,7 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
ChangeType = table.Column<byte>(nullable: false),
EntityId = table.Column<string>(maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
AuditLogId1 = table.Column<Guid>(nullable: true)
ExtraProperties = table.Column<string>(nullable: true)
},
constraints: table =>
{
@ -120,12 +112,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId1",
column: x => x.AuditLogId1,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
@ -163,11 +149,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
table: "AbpAuditLogActions",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId1",
table: "AbpAuditLogActions",
column: "AuditLogId1");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime",
table: "AbpAuditLogActions",
@ -188,11 +169,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
table: "AbpEntityChanges",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_AuditLogId1",
table: "AbpEntityChanges",
column: "AuditLogId1");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId",
table: "AbpEntityChanges",

@ -98,8 +98,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
@ -127,8 +125,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
@ -142,8 +138,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<Guid?>("AuditLogId1");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
@ -170,8 +164,6 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
b.HasIndex("AuditLogId");
b.HasIndex("AuditLogId1");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
@ -270,25 +262,17 @@ namespace MyCompanyName.MyProjectName.Host.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany()
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId1");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>

@ -30,4 +30,8 @@
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Migrations\20181212121232_Initial.cs" />
</ItemGroup>
</Project>

Loading…
Cancel
Save