tags:

views:

49

answers:

2

Let's say I have two objects, A and B, both with a model, view and a controller. The user is in the view for A, then presses a button or something that calls an action in the A controller. This action requires some use of the B model. From the action in the A controller, am I supposed to call directly to the B model, or should I be going through the B controller to interact with the B model? Thanks for reading.

A: 

I guess you should go through the B controller as B controller has access to B model.

happyhardik
What do you mean, "only has access?" There's no reason it HAS to be that way.
Matt Olenik
You "guess"? Is that how you code, by guessing?
RPM1984
oops! removed the word "only".
happyhardik
+1  A: 

You can have a ViewModel pattern see this http://stackoverflow.com/questions/1361092/asp-net-mvc-viewmodel-pattern

ajay_whiz