如何在N-Tier架构中通过wcf检测ObservableCollection中已更改的poco实体? [英] How to detect the changed poco entities in an ObservableCollection over wcf in N-Tier architecture?

查看:112
本文介绍了如何在N-Tier架构中通过wcf检测ObservableCollection中已更改的poco实体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有以下图层

日期图层(对模型的引用)

业务层(对模型,数据的引用)

型号

服务(WCF) - (参考模型,业务层)

UI(WPF / Silver Light) - 通过WCF服务连接



如何检测UI层中ObservableCollection中已更改的poco实体?

是否从客户端将其发送回服务器以进行保存?而不是将所有数据发送回服务器端(通过WCF)?







如何执行在UI层的集合中的实体上添加/删除/更新操作?



我正在使用

VS2010 / 2012

C#

EF 5

SQL Server 2012



尽管在很多地方搜索过我找不到合适的解决方案..

如果有任何想法请帮忙...



谢谢...



我使用以下链接中给出的方法开发了我的应用程序.. < br $> b $ b

http://www.toplinestrategies.com/dotneters/net/wcf-entity-framework-and-n-tier-solutions-part-2 /?lang = en / comment-page-1 /#comment-1954 [ ^ ]



任何人都知道如何在上面链接中给出的模式中对gridcontrol中每行的保存方法(CRUD)

I have following layers in my applicaiton
Date Layer (reference to Model)
Business Layer(reference to Model ,Data)
Model
Service(WCF)-(reference to Model,Business Layer)
UI (WPF/Silver Light) - Connected via WCF service

How do i detect the changed poco entities in an ObservableCollection in UI layer?
for sending it back to server from client side for saving ? instead of sending all data back to sever side(via WCF)?

or

how to perform add/delete/update operation on entities in the collection in UI layer?

I am using
VS2010/2012
C#
EF 5
ADO.NET POCOEntityGenerator With WCF Support(for generating .tt templates from Model.edmx)
SQL Server 2012

Even though searched a lot of places I didn't find a proper solution..
please help if any ideas...

Thanks...

I developed my application using the method given in following link..

http://www.toplinestrategies.com/dotneters/net/wcf-entity-framework-and-n-tier-solutions-part-2/?lang=en/comment-page-1/#comment-1954[^]

Any one know how to do save method (CRUD) of each row in gridcontrol in the pattern given in above link

推荐答案

直到我看到你正在使用EF,我才会有所帮助。我的简短回答是你没有,你必须在你的模型中实现INotifyPropertyCahnged。



我们从WCF和UI项目中引用模型项目。
I was going to be helpful right up until I saw that you are using EF. My short answer would be that you don't, you have to implement INotifyPropertyCahnged in your model.

We reference the model project from both the WCF and the UI projects.


这篇关于如何在N-Tier架构中通过wcf检测ObservableCollection中已更改的poco实体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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