They are both valid options, and one isn't necessarily any better than the other. Which one you choose is, ultimately, personal preference. Yes, Option A results in slightly less code, but overall they are pretty much equal.
In both cases you are controlling flow via an if and a return. It's really a question of how you prefer to see your boolean logic - negative or positive?
Is ActionResult
an enum or a base class? If it's an enum, why are you returning null
when Edit
returns what appears to be an enum? Wouldn't it be cleaner simply to return an ActionResult
value that indicates no action was taken because the object wasn't in an editable state?