Search code examples
c#wcfentity-frameworkwcf-ria-servicesria

Can/Should you use RIA's core domain service to perform services not related to entities?


I am using WCF RIA services with silverlight. Obviously I am using this primarily for retreival of entities from a datastore. My question is, is it OK to define other methods not related to CRUD operations of entites within the domain context? For example, I could define

    [Invoke]
    public void SendEmail(String Message)
    {
        //Do Something
    }

The sendemail method would have nothing to do with the entities of my application.

Is this done? Any downsides? Should I just define standard WCF services instead?

Looking for opinions as I can't seem to find information one way or the other.


Solution

  • I think it is perfectly fine. If you are already using RIA, I do not see any downsides. To make things more organized you can create another DomainService and separate your CRUD work of your other methods.