From 21d49d4156fa55836d5af94e18a61f7428231225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 25 Mar 2020 17:22:39 +0300 Subject: [PATCH] Document to use ConfigureByConvention as a best practice. --- docs/en/Best-Practices/Entity-Framework-Core-Integration.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md index 4f7e20dd70..db8117d798 100644 --- a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md @@ -89,13 +89,15 @@ public static class IdentityDbContextModelBuilderExtensions builder.Entity(b => { - b.ToTable(options.TablePrefix + "Users", options.Schema); + b.ToTable(options.TablePrefix + "Users", options.Schema); + b.ConfigureByConvention(); //code omitted for brevity }); builder.Entity(b => { b.ToTable(options.TablePrefix + "UserClaims", options.Schema); + b.ConfigureByConvention(); //code omitted for brevity }); @@ -104,6 +106,7 @@ public static class IdentityDbContextModelBuilderExtensions } ```` +* **Do** call `b.ConfigureByConvention();` for each entity mapping (as shown above). * **Do** create a **configuration options** class by inheriting from the `ModelBuilderConfigurationOptions`. Example: ````C#