有人可以定义POCO是什么意思?
解决方案我想知道如果只是简单的类,
Plain Old C#Object
只是一个普通类,没有描述基础设施问题的属性或您的域对象不应该具有的其他职责。
编辑 - 正如其他答案所说,它在技术上是普通老CLR对象,但我,像大卫亚诺评论,喜欢普通旧类对象,以避免与特定语言的关系,技术。
TO CLARIFY:换句话说,他们不是从派生一些特殊的基类,也不为它们的属性返回任何特殊的类型。
Can someone define what exactly 'POCO' means? I am encountering the term more and more often, and I'm wondering if it is only about plain classes or it means something more?
解决方案"Plain Old C# Object"
Just a normal class, no attributes describing infrastructure concerns or other responsibilities that your domain objects shouldn't have.
EDIT - as other answers have stated, it is technically "Plain Old CLR Object" but I, like David Arno comments, prefer "Plain Old Class Object" to avoid ties to specific languages or technologies.
TO CLARIFY: In other words, they don’t derive from some special base class, nor do they return any special types for their properties.
更多推荐
'POCO'定义
发布评论