Tuesday 15 January 2013

asp.net mvc - Can I get a simple bool value from another controller in my HomeController? -


There is a check for registration in my registration controller:

  Public class registration controller: controller {html} 

Private Readonly IAmaregistrationRepository _RegistrationRepository; Public Registration Controller (IAmaregistrationRepository Registration Regository) {_RegistrationRepository = Registration Replacement; } Public Bull IRGistered (String Username) {return _ register repository. ISR registered (user name); }}

How can I test it from my home controller? Is there any way to access controller builder to pull an open controller at present? Or at least one client controller may be able to generate one by using the factory I have loaded in my global builder in Global.asax.cs

>

I think you're ending it. You already have a method on your repository that you can use. Why do you make another controller just to call a method that just protects the repository method? Make an example of the repository in your home controller and use the IsRegistered method on it.


No comments:

Post a Comment