mirror of https://github.com/abpframework/abp.git
11 changed files with 59 additions and 67 deletions
@ -1,40 +0,0 @@ |
|||
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