专栏名称: go4it
目录
相关文章推荐
待字闺中  ·  给MCP祛魅 ·  2 天前  
OSC开源社区  ·  MCP这么火,来一波简单实操记录 ·  2 天前  
OSC开源社区  ·  TypeScript之父宣布:编译器和工具链 ... ·  昨天  
程序员的那些事  ·  湖南大学的 DeepSeek ... ·  3 天前  
码农翻身  ·  再这么搞下去,程序员失业是迟早的事! ·  3 天前  
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
}
复制代码






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