简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM