POCO /自动生成数据库表的优缺点(DDD using STE vs POCO)

编程入门 行业动态 更新时间:2024-10-23 04:42:24
POCO /自动生成数据库表的优缺点(DDD using STE vs POCO)

我刚被分配到一个ORM映射项目(带有C#代码和SQL Server数据库的以数据为中心的应用程序),其中明确要求使用POCO,并且ORM将从C#对象自动生成数据库 - 所以C#对象模型实际上是数据的王者。

我以前没有听说过POCO,我本能地非常担心自动生成数据库表的想法,因为(a)我的所有经验都让我相信,在以数据为中心的应用程序中,数据模型就是这样的东西。你必须先做对,并且(b)我怀疑自动生成的数据模式在索引,性能等方面是远程优化的。

任何人都可以指导我任何链接(或直接解释)这种方法的优缺点吗? 我试图更好地理解它,但很难找到关于它的很多概念信息。

谢谢

Developing n-layered application with DDD (o better DDDD because we are using WCF) using Microsoft technology (where we have full controll of all component), the best choise seems to be STE vs POCO (this last one force the usage of DTOs). That's right? In your opinion make sense the usage of STE with DTOs where we need them?

Thanks.

最满意答案

你现在可能刚刚完成了你的项目,但我有一个链接给你一个有类似问题的人: 使用STE vs POCO的DDD

I really can recommend Julie Lerman's Programming Entity Framework. She goes in depth about simple poco's, dto's and Self Tracking Entities. Advantages and disadvantages are described. But off course depending a lot on application requirements and personal taste.

So I can't give you an exact answer because the question is to general for that. But reading the book should give you a taste of the possible alternatives and can help you in making these kind of design decisions. I'm working with Self Tracking Entities in combination with a Business Access Layer, Serive Layer, WCF, Win / WPF clients. And expanding it in the future most probably with ASP.NET

更多推荐

本文发布于:2023-08-05 06:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428865.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:优缺点   自动生成   数据库   POCO   DDD

发布评论

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

>www.elefans.com

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