Skip to content

How to access types for action methods that return multiple types #12613

Closed Answered by gustavopch
jdmcd asked this question in Q&A
Discussion options

You must be logged in to vote

Don't return the redirect, throw it instead, so it won't appear in the return type. If you still need to return objects with different structures depending on what happened in the action, use a tagged union.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jdmcd
Comment options

@gustavopch
Comment options

@jdmcd
Comment options

@gustavopch
Comment options

@jdmcd
Comment options

Answer selected by jdmcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants