|
-
Jun 3rd, 2011, 01:55 PM
#2
Hyperactive Member
Re: Accessing Entities from another controller
What do you mean?
Controllers are standalone classes that act as...well...conducting data between your entities / view models and the views.
You can always create a new instance of your model in another controller....but not sure about what you really want to do.
Or maybe you mean you don't want to hit the database twice doing exactly the same thing?
Just move the query out to a "repository class" and cache the method returning the data?
But as for actually using one controller action from another controller, you should not be able to do that (if you can, your controller have responsibilities it should not have)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|