专栏名称: go4it
目录
相关文章推荐
阳光海南网  ·  报名进行中!2025海南省社区运动会乒乓球比 ... ·  22 小时前  
阳光海南网  ·  报名进行中!2025海南省社区运动会乒乓球比 ... ·  22 小时前  
深圳晚报  ·  价格“疯”涨!最高6880元 ·  2 天前  
深圳晚报  ·  价格“疯”涨!最高6880元 ·  2 天前  
封面新闻  ·  刚刚,中国乒协发声! ·  2 天前  
封面新闻  ·  刚刚,中国乒协发声! ·  2 天前  
51好读  ›  专栏  ›  go4it

聊聊go.cqrs的DomainRepository

go4it  · 掘金  ·  · 2021-04-08 23:22

正文

阅读 2

聊聊go.cqrs的DomainRepository

本文主要研究一下go.cqrs的DomainRepository

DomainRepository

// DomainRepository is the interface that all domain repositories should implement.
type DomainRepository interface {
	//Loads an aggregate of the given type and ID
	Load(aggregateTypeName string, aggregateID string) (AggregateRoot, error)

	//Saves the aggregate.
	Save(aggregate AggregateRoot, expectedVersion *int) error
}
复制代码






请到「今天看啥」查看全文