diff --git a/docs/en/Entities.md b/docs/en/Entities.md index 0d34c35ce6..538d298461 100644 --- a/docs/en/Entities.md +++ b/docs/en/Entities.md @@ -26,9 +26,9 @@ public class Book : Entity If your entity's Id type is `Guid`, there are some good practices to implement: * Create a constructor that gets the Id as a parameter and passes to the base class. - * If you don't set a GUID Id, ABP Framework sets it on save, but it is good to have a valid Id on the entity even before saving it to the database. -* If you create an entity with a constructor that takes parameters, also create a `protected` empty constructor. This is used while your database provider reads your entity from the database (on deserialization). -* Don't use the `Guid.NewGuid()` to set the Id! Use [the `IGuidGenerator` service](Guid-Generation.md) while passing the Id from the code that creates the entity. `IGuidGenerator` optimized to generate sequential GUIDs, which is critical for clustered indexes in the relational databases. + * If you don't set a GUID Id, **ABP Framework sets it on save**, but it is good to have a valid Id on the entity even before saving it to the database. +* If you create an entity with a constructor that takes parameters, also create a `private` or `protected` empty constructor. This is used while your database provider reads your entity from the database (on deserialization). +* Don't use the `Guid.NewGuid()` to set the Id! **Use [the `IGuidGenerator` service](Guid-Generation.md)** while passing the Id from the code that creates the entity. `IGuidGenerator` optimized to generate sequential GUIDs, which is critical for clustered indexes in the relational databases. An example entity: diff --git a/docs/en/Guid-Generation.md b/docs/en/Guid-Generation.md index 1cd2d6c218..0990f5b6dd 100644 --- a/docs/en/Guid-Generation.md +++ b/docs/en/Guid-Generation.md @@ -106,4 +106,6 @@ Configure(options => { options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; }); -```` \ No newline at end of file +```` + +> EF Core [integration packages](https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Other-DBMS) sets this option to a proper value for the related DBMS. So, most of the times, you don't need to set this option if you are using these integration packages. \ No newline at end of file