如何在不使用WCF的情况下将表示层连接到DataEntity层 [英] How to Connect Presentation Layer to DataEntity Tier without WCF

查看:110
本文介绍了如何在不使用WCF的情况下将表示层连接到DataEntity层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要按照以下步骤进行操作:

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

但是客户端告诉我不要在数据实体层和表示层之间使用WCF服务.也不提供Web服务或任何形式的任何服务.所以我改为放入类库.

还是应该在表单上以某种方式直接链接到DataEntityTier的DataGridView放下?

我已经尝试过将一个类库放在一起作为中间对象,并将其用作对象数据源. BindingNavigator可以正常运行,但不会填充gridview.

Brian

解决方案

看看如何:将对象绑定到Windows窗体控件 [ ^ ]-无需在两者之间放任何东西.如果您想使用DataSet,DataTable和适配器,我认为最好坚持使用旧的" Fill方式.

另一种方法是使用类似以下内容的方法:数据库助手v 2.0.0 [ MVP [<一个href ="http://msdn.microsoft.com/zh-cn/magazine/cc188690.aspx" target ="_ blank" title ="New Window"> ^ ]模式非常好.

I want to follow the procedure at:

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

but the client has told me not to use a WCF service in between the Data Entity Layer and the Presentation Tier. Nor a web service or any service of any kind. So I put in a Class Library instead.

Or should I plop down a DataGridView on my form that''s linked directly to the DataEntityTier somehow?

I''ve already tried putting together a class library to serve as the go-between and using it as an Object Data Source. The BindingNavigator works OK but the gridview won''t populate.

Brian

解决方案

Take a look at How to: Bind Objects to Windows Form Controls[^] - no need to put anything between. If you want to use DataSet, DataTable and adapters, I think it''s better to just stick with the "old" Fill way of doing things.

An aternative is to use something like:Database Helper v 2.0.0[^]

Best regards
Espen Harlinn


For such case an MVP[^] pattern is quite good.


这篇关于如何在不使用WCF的情况下将表示层连接到DataEntity层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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