English 中文(简体)
房地产服务能否退回单一习俗类型?
原标题:Can a DomainService return a single custom type?

我想在我的领域服务上采用一种方法,类似于:

public SystemState GetSystemStatus()
{
    return new SystemStatus
    {
        InterestingStatusValue1 = 1223,
        OtherInterstingStatusValue = "abc",
    }
}

这并不奏效。 对银星客户来说,没有自动生成。 如果我这样说是一种可贵的方法,那么我会向客户产生一些东西。 我拿到的是系统国家的财产和背景物体的彩礼方法。

难道没有办法使这一议程简单化? 我可以相信,WCF银灯能为我的区域影响评估研究所网站提供服务,然后确定服务参考资料(可能不正确)。 (为什么我能看到银灯中的服务参考资料?)

第一次模糊了一点,即审校服务似乎使数据重心/超常识数大,这对表编辑来说是巨大的,但对于数据网rag的低分辨率应用来说,这种应用并没有那么多。

最佳回答

您可以仅凭一个实体(假设系统国家是你的实体):

[Query(IsComposable = false)]
public SystemState GetSystemStatus()
{
    return new SystemStatus
    {
        InterestingStatusValue1 = 1223,
        OtherInterstingStatusValue = "abc",
    }
}

认为这仍然是一个问题,Ria Services将产生贵领域的一种方法:

EntityQuery<SystemState> GetSystemStatusQuery()

把它当作一个普通实体,但铭记,你可以在返回的物体上进行点击(ort或过滤)。

If you want to execute an operation on server, try using the [Invoke] attribute. 注

[Invoke]
public SystemState GetSystemStatus()
{
    return new SystemStatus
    {
        InterestingStatusValue1 = 1223,
        OtherInterstingStatusValue = "abc",
    }
}

我不知道贵国的返回类型如何复杂,但我猜测,如果能够序列化,它会(不是肯定的)工作。

问题回答

暂无回答




相关问题
How to write sum calculation based on ria service?

When using ria service for SL app, I can issue following async call to get a group of entity list. LoadOperation<Person> ch = this.AMSContext.Load(this.AMSContext.GetPersonQuery().Where(a =>...

Can you add security to an entity Property with RIA Services?

RIA services allows you to add an attribute to a domain service method like: RequiresRole("Admin"). This will automatically check if the user calling that method has the correct security to do so. I ...

Linq Containsfunction problem

I use Ria Service domainservice for data query. In My database, there is a table People with firstname, lastname. Then I use EF/RIA services for data processing. Then I create a Filter ViewModel ...

Hosted Silverlight LOB Application - Authentication Models

Our application is built in VB6 and delivered in a SaaS model via Citrix. Our subscribers must first authenticate to the Citrix Login Portal (AD) which gives them access to their applications. Each ...

Data not coming through from RIA Services in Silverlight

I had a connection working but something changed and now the data isn t showing up. It is a simple query that worked before that just returns all entities. I put in break points on the LoadOperation ...

热门标签