Pergunta

Can someone explain what these attributes HasSideEffects and IsComposable for?

Foi útil?

Solução

IsComposable

Indicates whether the query method allows query composition. You need to mark a query as IsComposable e.x. when you want to return a class, that contains another class and does not implement IEnumerable interface. When you won't do that, you gonna get an error:

Query operation 'XXX' cannot be marked composable since its return type 'YYY' does not implement IEnumerable of T.

HasSideEffects 

Indicates whether the invoke operation has side effects. You want to use it when invokes an operation with a lot of parameteres. HasSideEffectAttributes enforce a POST invoke, that has no limit like GET do.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top