[高分求解]mvc3 + wcf + entity framework该如何架构?主要是实体Entity如何处理?

inetfuture 2012-02-29 03:57:26
用EF做数据层,WCF提供服务,MVC做UI,主要是不知道实体如何处理,怎不能写多套吧(而且数据验证之类的应该符合DRY原则)?求高手指点,最好画个系统层次图,直观一些,谢谢。
...全文
428 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
种草德鲁伊 2012-03-04
  • 打赏
  • 举报
回复
http://microsoftnlayerapp.codeplex.com/

楼主可以看看这个项目,就是用楼主说的那些东西做的
inetfuture 2012-03-04
  • 打赏
  • 举报
回复
day day up
inetfuture 2012-03-03
  • 打赏
  • 举报
回复
up up, 还有加了WCF之后,如何单元测试?
tan598121925 2012-03-03
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 inetfuture 的回复:]

引用 6 楼 fangxinggood 的回复:

http://blog.csdn.net/fangxinggood/article/details/7203212

参考 UnitOfWork Repository 的设计 WCF就是返回 List<T>

公司太悲剧了,不能看博客,回去再看……
[/Quote]博客都不能看,杯具
inetfuture 2012-03-03
  • 打赏
  • 举报
回复
还是不甚明了啊 高人再指点下……
我现在是分三层, IDAL/DAL(EF Code First, Repositroy + unit of work), Contracts/Services, MVC,共用一套Models,不知是否合适?
inetfuture 2012-03-01
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 fangxinggood 的回复:]

http://blog.csdn.net/fangxinggood/article/details/7203212

参考 UnitOfWork Repository 的设计 WCF就是返回 List<T>
[/Quote]
公司太悲剧了,不能看博客,回去再看……
threenewbee 2012-03-01
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 fangxinggood 的回复:]
http://blog.csdn.net/fangxinggood/article/details/7203212

参考 UnitOfWork Repository 的设计 WCF就是返回 List<T>
[/Quote]

楼上的文章写得很好。
机器人 2012-03-01
  • 打赏
  • 举报
回复
http://blog.csdn.net/fangxinggood/article/details/7203212

参考 UnitOfWork Repository 的设计 WCF就是返回 List<T>
inetfuture 2012-03-01
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 claymore1114 的回复:]

基础架构层/公共层 里面,定义实体对应的接口,
数据层 ef模型,通过部分类 实现这个接口。
UI层,其它层 使用这个接口。
[/Quote]
为什么要用部分类呢?可不可以说的再具体点, 谢谢!
claymore1114 2012-02-29
  • 打赏
  • 举报
回复
基础架构层/公共层 里面,定义实体对应的接口,
数据层 ef模型,通过部分类 实现这个接口。
UI层,其它层 使用这个接口。
蛊惑精灵 2012-02-29
  • 打赏
  • 举报
回复
EF做实体层
数据层使用EF 进行抽象
inetfuture 2012-02-29
  • 打赏
  • 举报
回复
没有wcf还好说,加上它我就不知道怎么弄了,求指点
Paperback: 1625 pages Publisher: Apress; 7th ed. 2015 edition (January 1, 2016) Language: English ISBN-10: 1484213335 ISBN-13: 978-1484213339 This new 7th edition of Pro C# 6.0 and the .NET 4.6 Platform has been completely revised and rewritten to reflect the latest changes to the C# language specification and new advances in the .NET Framework. You'll find new chapters covering all the important new features that make .NET 4.6 the most comprehensive release yet, including: A Refined ADO.NET Entity Framework Programming Model Numerous IDE and MVVM Enhancements for WPF Desktop Development Numerous updates to the ASP.NET Web APIs This comes on top of award winning coverage of core C# features, both old and new, that have made the previous editions of this book so popular. Readers will gain a solid foundation of object-oriented development techniques, attributes and reflection, generics and collections as well as numerous advanced topics not found in other texts (such as CIL opcodes and emitting dynamic assemblies). The mission of this book is to provide you with a comprehensive foundation in the C# programming language and the core aspects of the .NET platform plus overviews of technologies built on top of C# and .NET (ADO.NET and Entity Framework, Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF), ASP.NET (WebForms, MVC, WebAPI).). Once you digest the information presented in these chapters, you’ll be in a perfect position to apply this knowledge to your specific programming assignments, and you’ll be well equipped to explore the .NET universe on your own terms. What you’ll learn Be the first to understand the .NET 4.6 platform and C# 6. Discover the ins and outs of the leading .NET technology. Learn from an award-winning author who has been teaching the .NET world since version 1.0. Find complete coverage of XAML, .NET 4.6 and Visual Studio 2015 together with discussion of the new Windows Runtime. Who this book is for This book is perfect for anyone who is interested in the new .NET Framework 4.6 and the C# language. Whether you are moving to .NET for the first time or are already writing applications using previous .NET versions, this book will provide you with a comprehensive grounding in the new technology and serve as a complete reference throughout your coding career.

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧