-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: CreateExtensions.vue's content & format
- Loading branch information
1 parent
95b99d3
commit 51c5c47
Showing
4 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
Bob.Abp.AppGen/Templates/EntityFrameworkCore/CreatingExtensions.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
Bob.Abp.AppGen/Templates/EntityFrameworkCore/CreatingExtensions_Calling.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
|
||
Configure{{EntityName}}(builder); | ||
Configure{{EntityName}}(builder); |
34 changes: 17 additions & 17 deletions
34
Bob.Abp.AppGen/Templates/EntityFrameworkCore/CreatingExtensions_Main.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
|
||
private static void Configure{{EntityName}}(ModelBuilder builder) | ||
{ | ||
builder.Entity<{{EntityName}}>(b => | ||
private static void Configure{{EntityName}}(ModelBuilder builder) | ||
{ | ||
//Configure table & schema name | ||
b.ToTable({{ModuleName}}DbProperties.DbTablePrefix + "{{ToPlural EntityName}}", {{ModuleName}}DbProperties.DbSchema); | ||
b.ConfigureByConvention(); | ||
{{#AllProperties}} | ||
{{#IsString}} | ||
b.Property(q => q.{{PropertyName}}){{#Required}}.IsRequired(){{/Required}}.HasMaxLength({{EntityName}}Consts.Max{{PropertyName}}Length); | ||
{{/IsString}} | ||
{{/AllProperties}} | ||
builder.Entity<{{EntityName}}>(b => | ||
{ | ||
//Configure table & schema name | ||
b.ToTable({{ModuleName}}DbProperties.DbTablePrefix + "{{ToPlural EntityName}}", {{ModuleName}}DbProperties.DbSchema); | ||
b.ConfigureByConvention(); | ||
{{#AllProperties}} | ||
{{#IsString}} | ||
b.Property(q => q.{{PropertyName}}){{#Required}}.IsRequired(){{/Required}}.HasMaxLength({{EntityName}}Consts.Max{{PropertyName}}Length); | ||
{{/IsString}} | ||
{{/AllProperties}} | ||
|
||
//Relations | ||
//b.HasMany<{{EntityName}}>().WithOne().HasForeignKey(p => p.ParentId).OnDelete(DeleteBehavior.ClientSetNull); | ||
//Relations | ||
//b.HasMany<{{EntityName}}>().WithOne().HasForeignKey(p => p.ParentId).OnDelete(DeleteBehavior.ClientSetNull); | ||
|
||
//Indexes | ||
//b.HasIndex(q => q.Code); | ||
}); | ||
} | ||
//Indexes | ||
//b.HasIndex(q => q.Code); | ||
}); | ||
} |