具有WCF命名空间问题的Datamanager [英] Datamanager with WCF Namespace problem
问题描述
嗨
我已经编写了一个DataAccess Manager类,该类可以直接在视图模型中使用,也可以通过wcf服务从db获取数据.
I have written a DataAccess Manager Class which can be used directly in the viewmodel or through a wcf service to get data from db.
我想在我的视图模型中进行切换,以在直接或服务之间进行切换.为此,我实现了数据访问管理器类和wcf服务定义所使用的接口.
I would like to have a switch in my view model to switch between direct or service. For this I implemented an Interface used by the dataaccess manager class and the wcf service definition.
如果我尝试实现此功能,则会出现一个问题,即ServiceClient的命名空间向我显示此接口位于Service中,而不是位于正确的命名空间中,如下所示:
If I try to implement this I get a problem that the namespace of the ServiceClient is showing me that this Interface is in the Service and not in the correct Namespace like this:
DataAccessService.DataServiceClient.IDataAccess
DataAccessService.DataServiceClient.IDataAccess
代替
AppInterfaces.IDataAccess
AppInterfaces.IDataAccess
由于这个(或者可能是其他原因),我不得不将DataServiceClient强制转换为(AppInterfaces.IDataAccess),并且这不起作用...
Because of this (or maybe something else) I have to cast the DataServiceClient to (AppInterfaces.IDataAccess) and this is not working...
有人知道如何使它工作吗?
Does someone has an idea how to get this working?
感谢您的帮助.
节拍
推荐答案
有人可以帮忙吗?
这篇关于具有WCF命名空间问题的Datamanager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!