使用SCSF-ADO.NET EF-LINQ-MSMQ-WCF的最佳架构 [英] Optimum Architecture using SCSF-ADO.NET EF-LINQ-MSMQ-WCF

查看:70
本文介绍了使用SCSF-ADO.NET EF-LINQ-MSMQ-WCF的最佳架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的人们,
当前,我们通过使用表作为唯一的DB对象编写ANSII标准查询,将SCSF/CAB用于表示和业务层,将Microsoft数据应用程序块用于数据访问层,以支持多个DB.我们现在计划利用.net的先进功能,将应用程序改进/切换为更好的体系结构.我还要提及的是,该应用程序使用了广泛的数学计算并绘制了大量图形.因此,我们需要在运行时将所有数据缓存到内存中,以最大程度地减少数据库行程,从而使应用程序能够快速运行,因此,我们需要为用户提供一种将数据与最新数据库表数据同步的功能(通过单击一个按钮,也许..).下面的示意图可能会更好地理解现有方案:

考虑到整个场景,我们计划实现一个框架,其中所有业务实体都是ADO.net实体框架,Microsoft数据应用程序块将放置在WCF服务中,该服务还将包含MSMQ以自动执行缓存数据更新应用程序中的所有数据操作将使用LINQ完成.使用WCF的想法是因为在不久的将来,我们可能会进一步增强应用程序以支持Web,从而提供支持.下面给出的是所建议的应用程序的示意图:


在设计上述架构时,我想到了以下几个问题,并在下面列出:

1.是否可以使用存储过程和OpenXML而不是使用ADO.net实体框架来完成所有数据库操作?

2.我们是否可以实现ADO.Net实体框架,并且所有的数据库操作都可以使用存储过程来完成?

3.实现LINQ to SQL?

谢谢n问候,
Sudipta

Dear Folks,
Currently we are using SCSF / CAB for the Presentation and Business Layer, Microsoft Data Application Block for the Data Access Layer that supports multiple DB by writing ANSII standard query using Tables as the sole DB objects. We now plan to improve / switch the application to a better Architecture with the advance features of .net. Also I would like to mention that the application uses extensive mathematical calculations and renders huge graphics. Because of this, we need to cache all the data in run time to the memory to minimize the DB trip enabling the application to run fast and hence we need to provide the user a facility to synchronize the data with latest DB Table data (by clicking a button, maybe..). The existing scenario may be better comprehended by the schematic diagram given below:

Keeping the entire scenarios in mind we are planning to implement a framework where all the Business Entities will be ADO.net Entity Framework, the Microsoft Data Application Block will be placed in a WCF service, which will also contain MSMQ to automate the Cached Data updating and all the Data Manipulation within the application will be done using LINQ. The thought of using WCF is because in near future we may further enhance the application to support Web and hence the provision. Given below is the schematic diagram of the proposed application:


While designing the above architecture here are a few questions that have come up in my mind and are listed below:

1. Can all the DB operation be done using Stored Procedure and OpenXML instead of using the ADO.net Entity Framework?
OR
2. Can we implement the ADO.Net Entity Framework and all the DB operation be done using Stored Procedure?
OR
3. Implement the LINQ to SQL?

Thanks n Regards,
Sudipta

推荐答案

我只是要回答第2点)

是的,您可以将您的实体对象映射到存储过程

http://msdn.microsoft.com/en-us/library/bb896279.aspx [ ^ ]

注意:

如果不将实体类型的所有三个插入,更新和删除操作都映射到存储过程,则在运行时执行未映射的操作将失败,并且将引发UpdateException."

有关映射SELECT程序的进一步阅读

http://www.robbagby.com/entity-framework/entity-framework -modeling-select-stored-procedures/ [
I''m just going to answer point 2)

Yes, you can map your entity objects to stored procedures

http://msdn.microsoft.com/en-us/library/bb896279.aspx[^]

Pay attentions to:

"If you do not map all three of the insert, update, and delete operations of an entity type to stored procedures, the unmapped operations will fail if executed at runtime, and an UpdateException will be thrown."

Some further reading on mapping SELECT procedures

http://www.robbagby.com/entity-framework/entity-framework-modeling-select-stored-procedures/[^]


这篇关于使用SCSF-ADO.NET EF-LINQ-MSMQ-WCF的最佳架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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