如何在不使用WCF的情况下将表示层连接到DataEntity层

编程入门 行业动态 更新时间:2024-10-25 06:31:22
本文介绍了如何在不使用WCF的情况下将表示层连接到DataEntity层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我要按照以下步骤进行操作: msdn.microsoft/en-us/library/bb384570.aspx [ ^ ] 但是客户端告诉我不要在数据实体层和表示层之间使用WCF服务.也不提供Web服务或任何形式的任何服务.所以我改为放入类库. 还是应该在表单上以某种方式直接链接到DataEntityTier的DataGridView放下? 我已经尝试过将一个类库放在一起作为中间对象,并将其用作对象数据源. BindingNavigator可以正常运行,但不会填充gridview. Brian

解决方案

看看如何:将对象绑定到Windows窗体控件 [ ^ ]-无需在两者之间放任何东西.如果您想使用DataSet,DataTable和适配器,我认为最好坚持使用旧的" Fill方式. 另一种方法是使用类似以下内容的方法:数据库助手v 2.0.0 [ ^ ] 最好的问候 Espen Harlinn

在这种情况下, MVP [ ^ ]模式非常好.

I want to follow the procedure at: msdn.microsoft/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层

本文发布于:2023-11-15 04:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1591108.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   情况下   如何在   DataEntity   WCF

发布评论

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

>www.elefans.com

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