Browse Source

Best practice update: Do not define set; for the properties for dbcontext interfaces.

pull/7894/head
Halil İbrahim Kalkan 6 years ago
parent
commit
bd1e251435
  1. 6
      docs/en/Best-Practices/Entity-Framework-Core-Integration.md

6
docs/en/Best-Practices/Entity-Framework-Core-Integration.md

@ -16,11 +16,13 @@
[ConnectionStringName("AbpIdentity")]
public interface IIdentityDbContext : IEfCoreDbContext
{
DbSet<IdentityUser> Users { get; set; }
DbSet<IdentityRole> Roles { get; set; }
DbSet<IdentityUser> Users { get; }
DbSet<IdentityRole> Roles { get; }
}
````
* **Do not** define `set;` for the properties in this interface.
### DbContext class
* **Do** inherit the `DbContext` from the `AbpDbContext<TDbContext>` class.

Loading…
Cancel
Save