23 changed files with 67 additions and 173 deletions
@ -1,5 +1,5 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Data Source=120.24.194.14;Database=CompanyNameProjectNameDB1;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" |
|||
"Default": "Data Source=localhost;Database=CompanyNameProjectNameDB20211106;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" |
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>CompanyName.ProjectName</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\CompanyName.ProjectName.EntityFrameworkCore\CompanyName.ProjectName.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.8"> |
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
|||
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,16 +0,0 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace CompanyName.ProjectName.EntityFrameworkCore |
|||
{ |
|||
[DependsOn( |
|||
typeof(ProjectNameEntityFrameworkCoreModule) |
|||
)] |
|||
public class ProjectNameEntityFrameworkCoreDbMigrationsModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddAbpDbContext<ProjectNameMigrationsDbContext>(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,54 +0,0 @@ |
|||
using CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore; |
|||
using CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.IdentityServer.EntityFrameworkCore; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|||
|
|||
namespace CompanyName.ProjectName.EntityFrameworkCore |
|||
{ |
|||
/* This DbContext is only used for database migrations. |
|||
* It is not used on runtime. See ProjectNameDbContext for the runtime DbContext. |
|||
* It is a unified model that includes configuration for |
|||
* all used modules and your application. |
|||
*/ |
|||
public class ProjectNameMigrationsDbContext : AbpDbContext<ProjectNameMigrationsDbContext> |
|||
{ |
|||
public ProjectNameMigrationsDbContext(DbContextOptions<ProjectNameMigrationsDbContext> options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
/* Include modules to your migration db context */ |
|||
|
|||
builder.ConfigurePermissionManagement(); |
|||
builder.ConfigureSettingManagement(); |
|||
builder.ConfigureBackgroundJobs(); |
|||
builder.ConfigureAuditLogging(); |
|||
builder.ConfigureIdentity(); |
|||
builder.ConfigureIdentityServer(); |
|||
builder.ConfigureFeatureManagement(); |
|||
builder.ConfigureTenantManagement(); |
|||
|
|||
/* Configure your own tables/entities inside the ConfigureProjectName method */ |
|||
|
|||
builder.ConfigureProjectName(); |
|||
|
|||
// 数据字典
|
|||
builder.ConfigureDataDictionaryManagement(); |
|||
|
|||
builder.ConfigureNotificationManagement(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +1,29 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\common.props" /> |
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>CompanyName.ProjectName</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\modules\DataDictionaryManagement\src\CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore\CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\modules\NotificationManagement\src\CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore\CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\CompanyName.ProjectName.Domain\CompanyName.ProjectName.Domain.csproj" /> |
|||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)" /> |
|||
</ItemGroup> |
|||
<Import Project="..\..\..\common.props"/> |
|||
<PropertyGroup> |
|||
<TargetFramework>net5.0</TargetFramework> |
|||
<RootNamespace>CompanyName.ProjectName</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\modules\DataDictionaryManagement\src\CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore\CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore.csproj"/> |
|||
<ProjectReference Include="..\..\..\modules\NotificationManagement\src\CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore\CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.csproj"/> |
|||
<ProjectReference Include="..\CompanyName.ProjectName.Domain\CompanyName.ProjectName.Domain.csproj"/> |
|||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)"/> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.7"> |
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
|||
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
</Project> |
|||
|
|||
Loading…
Reference in new issue