From bd1e251435d14ea9e22d75662838f3599632be75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 26 Feb 2021 14:55:31 +0300 Subject: [PATCH] Best practice update: Do not define set; for the properties for dbcontext interfaces. --- docs/en/Best-Practices/Entity-Framework-Core-Integration.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md index 04ddeaeba4..4db6518201 100644 --- a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md @@ -16,11 +16,13 @@ [ConnectionStringName("AbpIdentity")] public interface IIdentityDbContext : IEfCoreDbContext { - DbSet Users { get; set; } - DbSet Roles { get; set; } + DbSet Users { get; } + DbSet Roles { get; } } ```` +* **Do not** define `set;` for the properties in this interface. + ### DbContext class * **Do** inherit the `DbContext` from the `AbpDbContext` class.