What is the exact difference between [Query] and [Invoke] in Ria services?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You add methods to a domain service that perform the data operation you want to expose. For example, you can add methods that perform the following operations:
Query methods return either a single Entity object, an IQueryable object, or an IEnumerable object.
In addition, you can add the following more complicated operations:
Invoke operations provide an out-of-band mechanism for returning non-entity data and executing operations with side-effects. For more information about side-effects, see the HasSideEffects property. Invoke operations are usually not appropriate for query methods. Even when an invoke operation returns an entity, the entity is generated for the client project only if it is returned by a query method.
This was gathered from here.
Hope this helps.