What are alternatives to “delegates” for passing data between controllers?

前端 未结 6 1604
清酒与你
清酒与你 2020-12-29 00:26

Are there alternatives to \"delegates\" to pass back data from one controller to another?

Just seems like a lot of work implementing a delegate just to pass back the

6条回答
  •  独厮守ぢ
    2020-12-29 01:12

    Folks pay a lot of attention the the V and the C in MVC, but often forget the M. If you've got a data model, you can pass it from one controller to the next. When one controller makes changes to the data stored in the model, all the other controllers that share the same model will automatically get the changes.

提交回复
热议问题