|
|
|
@ -7,11 +7,24 @@ using Volo.Abp.Users.EntityFrameworkCore; |
|
|
|
|
|
|
|
namespace MyCompanyName.MyProjectName.EntityFrameworkCore |
|
|
|
{ |
|
|
|
/* This is your actual DbContext used on runtime. |
|
|
|
* It includes only your entities. |
|
|
|
* It does not include entities of the used modules, because each module has already |
|
|
|
* its own DbContext class. If you want to share some database tables with the used modules, |
|
|
|
* just create a structure like done for AppUser. |
|
|
|
* |
|
|
|
* Don't use this DbContext for database migrations since it does not contain tables of the |
|
|
|
* used modules (as explained above). See MyProjectNameMigrationsDbContext for migrations. |
|
|
|
*/ |
|
|
|
[ConnectionStringName("Default")] |
|
|
|
public class MyProjectNameDbContext : AbpDbContext<MyProjectNameDbContext> |
|
|
|
{ |
|
|
|
public DbSet<AppUser> Users { get; set; } |
|
|
|
|
|
|
|
/* Add DbSet properties for your Aggregate Roots / Entities here. |
|
|
|
* Also map them inside MyProjectNameDbContextModelCreatingExtensions.ConfigureMyProjectName |
|
|
|
*/ |
|
|
|
|
|
|
|
public MyProjectNameDbContext(DbContextOptions<MyProjectNameDbContext> options) |
|
|
|
: base(options) |
|
|
|
{ |
|
|
|
|