Domanda

Can someone explain what these attributes HasSideEffects and IsComposable for?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top