域名服务VS WCF服务? [英] Domain Service vs WCF Service?

查看:124
本文介绍了域名服务VS WCF服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林慢慢钻研Silverlight和好后尝试我终于能够从我的网站给我回自己的自定义对象到我的Silverlight客户端,使用Siverlight启用WCF服务。

Im slowly delving into Silverlight and after a good while trying I am finally able to return my own Custom Object from my web to my silverlight client, use a Siverlight enabled WCF service.

现在,即时通讯有点在域名服务和WCF服务的差异之间的损失。

Now, im a little at a loss between the differences of a Domain Service, and a WCF Service.

香港专业教育学院通过辅导工作,在那里域服务是绑那么势必siliverlight控件的数据上下文。伟大的:)不过,我在那里打石头试图返回任何东西吧IQuerryable;作为字符串,我自己的简单类型等等。

Ive worked through the tutorials where a Domain Service is tied to a data context then bound to siliverlight controls. Great :) However, where i hit a rock was trying to return anything bar IQuerryable; as String, my own simple type etc.

我发现了一些教程,如的此内容显示标记用[的ServiceContract]注释的功能和简单的类中有一个[关键]。这没有工作,[的ServiceContract]是无法解析的,后来我发现了一个导游说要使用[调用]。然后我打的没能装载功能,得到的结果的问题,我基本上去这里

I found a few tutorials such as this showing to mark a function with the [ServiceContract] annotation and to have a [Key] within your simple class. This didnt work, [ServiceContract] was not resolvable, and i later found a guide saying to use [Invoke]. I then hit issues of not been able to load the function and get a result, i basically go to here

[Invoke]
    public string HelloWorld(string name)
    {
        return string.Format("Hello {0}.", name);
    }


var helloWorld = new HelloWorldDomainContext();
        //helloWorld.HelloWorldCompleted += new EventHandler<InvokeEventArgs<string>>(HelloWorldHelloWorldCompleted);
        //helloWorld.HelloWorld("Mark Monster");

无论如何,所以后来我发现Silverlight的启用WCF服务,并且我能够回到自己的自定义对象和。称之为细

Anyway, so I then discovered silverlight enabled WCF services, and am able to return my own custom objects and call this fine.

TL;博士 - 是否域服务仅可使用状态时绑定到Silverlight控件?即它的种类有直接的一种方式,并结合被称为,并在需要的时候,和我做的所有的LINQ相关的分类/过滤/服务器上的选择?

tl;dr - Are Domain Services only for use when binding to Silverlight controls? Ie its kind of a direct one way binding and is called as and when is needed, and i do all Linq related sorting / filtering / selecting on the server?

和让说,我想返回的xmlString,然后使用WCF服务?我的权利,以使用WCF服务和域服务组合在我的应用程序?

And lets say I want to return an xmlString, then i use a WCF service? Am i right to be using a mix of WCF services and Domain Services in my application?

很抱歉,如果上面是有点混乱!只是试图让与来自ASP.NET / Flex的长久这一切到来

Sorry if the above is a bit confusing! Just trying to get to grips with this all coming from ASP.NET / Flex

感谢交手。

推荐答案

这应该澄清一些事情:
WCF RIA服务:从返回RIA一个简单的POCO

This should clear things up: WCF RIA Services: Returning a Simple POCO from RIA

这篇关于域名服务VS WCF服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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