Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description of when things get saved on a method. #403

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modeling/model-components/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Methods can be annotated with attributes to control API exposure and TypeScript
The [[Coalesce]](/modeling/model-components/attributes/coalesce.md) attribute causes the method to be exposed via a generated API controller. This is not needed for methods defined on an interface marked with `[Service]` - Coalesce assumes that all methods on the interface are intended to be exposed. If this is not desired, create a new, more restricted interface with only the desired methods to be exposed.

### `[ControllerAction(Method = HttpMethod, VaryByProperty = string)]`
The [[ControllerAction]](/modeling/model-components/attributes/controller-action.md) attribute controls how this method is exposed via HTTP. Can be used to customize the HTTP method/verb for the method, as well as caching behavior.
The [[ControllerAction]](/modeling/model-components/attributes/controller-action.md) attribute controls how this method is exposed via HTTP. Can be used to customize the HTTP method/verb for the method, as well as caching behavior. On an instance method, by specifying the `HttpMethod.Get` Method argument, the instance of the object will not be saved. The `Post`, `Put`, `Delete`, and `Patch` Method arguments will save the instance object after the method completes as part of the controller action.

### `[Execute(string roles)]`
The [[Execute]](/modeling/model-components/attributes/execute.md) attribute specifies which roles can execute this method from the generated API controller. Additional security restrictions that cannot be implemented with roles should be enforced with custom code in the method's implementation.
Expand Down
Loading