Abp 官网开始的教程例子,是IRpositoty<entity> 直接出现在应用层.但是如果是一个聚合根也会这样吗? 那么聚合根是访问仓储的最小单元,要通过聚合根来操作业务,就是实体,那么实体的增删改查,也应该在聚合根里面. 这就就有一个问题,实体继承了聚合根,,他没有仓储,怎么保存呢? 方法一: 依赖注入,这是不行的,这样数据库迁移不成功. public class Order :AggregateRoot, IRepository<Order>, ICreationAudi…
AggregateRoot和Entity的区别 AggregateRoot继承于Entity,并实现了IGeneratesDomainEvents接口 public class AggregateRoot<TPrimaryKey> : Entity<TPrimaryKey>, IAggregateRoot<TPrimaryKey>, IEntity<TPrimaryKey>, IGeneratesDomainEvents { public Aggregate…
ABP入门系列目录--学习Abp框架之实操演练 源码路径:Github-LearningMpaAbp 1. 前言 In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data,…