/// <summary>
 /// 当创建实体对象模型时被调用。
 /// </summary>
 /// <param name="modelBuilder">实体对象模型构建器。</param>
 protected override void OnModelCreating(ModelBuilder modelBuilder)
 {
     UserEntity.Configure(modelBuilder.Entity <UserEntity>());
     PostRegionEntity.Configure(modelBuilder.Entity <PostRegionEntity>());
     PostEntity.Configure(modelBuilder.Entity <PostEntity>());
     UserWatchPostEntity.Configure(modelBuilder.Entity <UserWatchPostEntity>());
     UserVotePostEntity.Configure(modelBuilder.Entity <UserVotePostEntity>());
     CommentEntity.Configure(modelBuilder.Entity <CommentEntity>());
 }
Exemple #2
0
 protected override void OnModelCreating(ModelBuilder modelBuilder)
 {
     UserEntity.Configure(modelBuilder.Entity <UserEntity>());
     BookEntity.Configure(modelBuilder.Entity <BookEntity>());
     OrderEntity.Configure(modelBuilder.Entity <OrderEntity>());
     PostEntity.Configure(modelBuilder.Entity <PostEntity>());
     CommentEntity.Congifure(modelBuilder.Entity <CommentEntity>());
     RewardEntity.Configure(modelBuilder.Entity <RewardEntity>());
     ShoppingCartEntity.Configure(modelBuilder.Entity <ShoppingCartEntity>());
 }