mirror of https://github.com/abpframework/abp.git
committed by
GitHub
30 changed files with 263 additions and 68 deletions
@ -0,0 +1,37 @@ |
|||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.ObjectExtending; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookStoreEfCoreEntityExtensionMappings |
||||
|
{ |
||||
|
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. |
||||
|
* |
||||
|
* The properties defined here becomes table fields. |
||||
|
* If you want to use the ExtraProperties dictionary of the entity |
||||
|
* instead of creating a new field, then define the property in the |
||||
|
* MyProjectNameDomainObjectExtensions class. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* ObjectExtensionManager.Instance |
||||
|
* .MapEfCoreProperty<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,36 @@ |
|||||
|
using Volo.Abp.ObjectExtending; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.BookManagement.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookManagementEfCoreEntityExtensionMappings |
||||
|
{ |
||||
|
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. |
||||
|
* |
||||
|
* The properties defined here becomes table fields. |
||||
|
* If you want to use the ExtraProperties dictionary of the entity |
||||
|
* instead of creating a new field, then define the property in the |
||||
|
* MyProjectNameDomainObjectExtensions class. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* ObjectExtensionManager.Instance |
||||
|
* .MapEfCoreProperty<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,37 @@ |
|||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.ObjectExtending; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace Acme.BookStore.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class BookStoreEfCoreEntityExtensionMappings |
||||
|
{ |
||||
|
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. |
||||
|
* |
||||
|
* The properties defined here becomes table fields. |
||||
|
* If you want to use the ExtraProperties dictionary of the entity |
||||
|
* instead of creating a new field, then define the property in the |
||||
|
* MyProjectNameDomainObjectExtensions class. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* ObjectExtensionManager.Instance |
||||
|
* .MapEfCoreProperty<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,37 @@ |
|||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.ObjectExtending; |
||||
|
using Volo.Abp.Threading; |
||||
|
|
||||
|
namespace DashboardDemo.EntityFrameworkCore |
||||
|
{ |
||||
|
public static class DashboardDemoEfCoreEntityExtensionMappings |
||||
|
{ |
||||
|
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. |
||||
|
* |
||||
|
* The properties defined here becomes table fields. |
||||
|
* If you want to use the ExtraProperties dictionary of the entity |
||||
|
* instead of creating a new field, then define the property in the |
||||
|
* MyProjectNameDomainObjectExtensions class. |
||||
|
* |
||||
|
* Example: |
||||
|
* |
||||
|
* ObjectExtensionManager.Instance |
||||
|
* .MapEfCoreProperty<IdentityUser, string>( |
||||
|
* "MyProperty", |
||||
|
* b => b.HasMaxLength(128) |
||||
|
* ); |
||||
|
* |
||||
|
* See the documentation for more: |
||||
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
|
*/ |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue