mirror of https://github.com/abpframework/abp.git
31 changed files with 290 additions and 103 deletions
@ -0,0 +1,33 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore.Extensions; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookStoreEntityExtensions |
||||
|
{ |
||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
|
|
||||
|
public static void Configure() |
||||
|
{ |
||||
|
OneTimeRunner.Run(() => |
||||
|
{ |
||||
|
/* You can configure entity extension properties for the |
||||
|
* entities defined in the used modules. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* EntityExtensionManager.AddProperty<IdentityUser, string>( |
||||
|
* "MyProperty", |
||||
|
* b => |
||||
|
* { |
||||
|
* b.HasMaxLength(128); |
||||
|
* }); |
||||
|
* |
||||
|
* See the documentation for more: |
||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
|
*/ |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore.Extensions; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.BookManagement.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookManagementEntityExtensions |
||||
|
{ |
||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
|
|
||||
|
public static void Configure() |
||||
|
{ |
||||
|
OneTimeRunner.Run(() => |
||||
|
{ |
||||
|
/* You can configure entity extension properties for the |
||||
|
* entities defined in the used modules. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* EntityExtensionManager.AddProperty<IdentityUser, string>( |
||||
|
* "MyProperty", |
||||
|
* b => |
||||
|
* { |
||||
|
* b.HasMaxLength(128); |
||||
|
* }); |
||||
|
* |
||||
|
* See the documentation for more: |
||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
|
*/ |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore.Extensions; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookStoreEntityExtensions |
||||
|
{ |
||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
|
|
||||
|
public static void Configure() |
||||
|
{ |
||||
|
OneTimeRunner.Run(() => |
||||
|
{ |
||||
|
/* You can configure entity extension properties for the |
||||
|
* entities defined in the used modules. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* EntityExtensionManager.AddProperty<IdentityUser, string>( |
||||
|
* "MyProperty", |
||||
|
* b => |
||||
|
* { |
||||
|
* b.HasMaxLength(128); |
||||
|
* }); |
||||
|
* |
||||
|
* See the documentation for more: |
||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
|
*/ |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore.Extensions; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace DashboardDemo.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class DashboardDemoEntityExtensions |
||||
|
{ |
||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
|
|
||||
|
public static void Configure() |
||||
|
{ |
||||
|
OneTimeRunner.Run(() => |
||||
|
{ |
||||
|
/* You can configure entity extension properties for the |
||||
|
* entities defined in the used modules. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* EntityExtensionManager.AddProperty<IdentityUser, string>( |
||||
|
* "MyProperty", |
||||
|
* b => |
||||
|
* { |
||||
|
* b.HasMaxLength(128); |
||||
|
* }); |
||||
|
* |
||||
|
* See the documentation for more: |
||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
|
*/ |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore.Extensions; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookStoreEntityExtensions |
||||
|
{ |
||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
|
|
||||
|
public static void Configure() |
||||
|
{ |
||||
|
OneTimeRunner.Run(() => |
||||
|
{ |
||||
|
/* You can configure entity extension properties for the |
||||
|
* entities defined in the used modules. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* EntityExtensionManager.AddProperty<IdentityUser, string>( |
||||
|
* "MyProperty", |
||||
|
* b => |
||||
|
* { |
||||
|
* b.HasMaxLength(128); |
||||
|
* }); |
||||
|
* |
||||
|
* See the documentation for more: |
||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
|
*/ |
||||
|
|
||||
|
EntityExtensionManager.AddProperty<IdentityRole, string>( |
||||
|
nameof(AppRole.Title), |
||||
|
b => |
||||
|
{ |
||||
|
b.HasMaxLength(128); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue