domainservices

WCF Ria Services ChangeSet.GetOriginal(): How does it work?

Hello, I have a fairly simple question to which I cannot seem to find the answer for. I have a silverlight app with Ria Services. In the DomainService class I have an update method like below: public void UpdateConversationState(ConversationState currentConversationState) { var original = ChangeSet.GetOriginal(currentConver...

How to get Custom validation error?

Suppose I have entity Person with properties typeid and salary. I build a business rule for this two properties like: public static partial class MyRules { public static ValidationResult Rule1(Person p, ValidationContext context) { if ((p.typeid == 1) && ((p.salary == null)) { ...

DomainService Include Get Child/Sub Entities in the client?

How do I include child entities from a DomainService, without the chance of my code being overwritten when I generate a new DomainDervice? I am trying to include sub entities with my query. For instance, I have a ParentTable and a ChildTable. I can retrieve the ChildTable entities as follows: Modify the DomainService metadata file to...

what event type should be set when call a SP from domainservice?

suppose I have a SP and import it as function MySp by EF. Then I want to call this function as: Context.MySp(CallbackComplete, null); public event Action<T> CallbackComplete; //how to write this line code??? In order to capture the complete event, what's the right code for call back event definition? ...

Providing update notification from DomainService to DomainContext

I need to inform the DomainContext in the silverlight application about changes that are made on the serverside (aka. Model of the DomainService). Does the DomainService or other classes for RIA Services provide such notification (like Events) or do i have to call a method on the DomainService periodically to check if changes where made...