POCO实体框架
实体框架中 POCO 支持的重要性是什么?
也许最好问 POCO 有什么用途?
What is the importance of POCO support in Entity Framework?
Maybe its better to ask What is the uses of POCO ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上 POCO 类似于 .net 世界中的 POJO(普通旧 java 对象)。 POCO 是不必遵循任何特定约定(实现任何接口、扩展任何类、具有特殊属性或命名约定等)的对象。
一些持久框架迫使我们使用特定的接口或属性、抽象类。只要您从头开始处理一个项目并且选择要使用的框架,这就不是问题,但如果您处理遗留系统并希望更改其数据访问层以使用持久框架,则可能会出现问题。产生负面影响。
Actually POCO is similar to POJO (Plain old java objects) in .net world. POCOs are objects tha don't have to follow any particular conventions (implementing any interface ,extending any class,having special attributes or naming convention etc.)
Some of the persistent frameworks force us to use specific interfaces or attirbutes , abstract classes. This is not a problem as long as you are working on a project from scratch and you are choosing which framework to use but if you are working on a legacy system and want to change its data access layer to use a persistent framework , it might have a negative impact.
真的很短:
您的对象对 EntityFramework 一无所知,但绑定到它(绑定到上下文,以便 EntityFramework 可以处理)。
Realy short:
That you have objects that didn't know anything about the EntityFramework but are bound to it (Bound to the context so that the EntityFramework can take care).