Can someone explain what these attributes HasSideEffects and IsComposable for?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top