'POCO'定义 [英] 'POCO' definition

查看:157
本文介绍了'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'定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆