'POCO'定义

编程入门 行业动态 更新时间:2024-10-25 16:21:20
本文介绍了'POCO'定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人可以定义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'定义

本文发布于:2023-07-27 11:49:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222297.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:定义   POCO

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!