gpt4 book ai didi

oop - 业务对象与实体

转载 作者:行者123 更新时间:2023-12-04 01:31:33 25 4
gpt4 key购买 nike

关闭。这个问题需要更多focused .它目前不接受答案。












想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post .

2年前关闭。



Improve this question




业务对象和实体之间有区别吗?

如果我要定义一个 POCO 类型的类,比如说一个 Product 类,它是一个业务对象还是一个实体?

public class Product {
public int ID { get; set; }
public string Name { get; set; }
public double Price { get; set; }
public string Sku { get; set; }
}

请注意,此对象中没有任何功能。

最佳答案

我将其称为 DTO(数据传输对象)。过去我也看到过它们被称为“属性(property)等级”。我不会称它为业务对象,因为它没有行为,并且根据定义,BO 是由它们的行为定义的。

关于oop - 业务对象与实体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/623352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com