Did I not fill out the example enough?
On Thu, Oct 30, 2008 at 4:52 PM, Chris Hoffman
<[EMAIL PROTECTED]> wrote:
> I'm confused. If I were following the example to which I linked, it
> seems like I would have to replace this
>
> Report rpt = Repository<Report>.Get(int.Parse(Request.Form["ID"]));
>
> with this
>
>
> IRepository<Report> ReportRepository { get; set; }
> ...
> Report rpt = ReportRepository.Get(int.Parse(Request.Form["ID"]));
>
> and ensure this is set every time the controller is instantiated?
> That doesn't seem right to me, since I am happily able to use the
> first syntax example in a web environment.
>
> Thanks for your additional thoughts.
>
> On Thu, Oct 30, 2008 at 4:04 PM, Ken Egozi <[EMAIL PROTECTED]> wrote:
>> you can use Property Injection instead of Constructor Injection.
>>
>>
>> On Thu, Oct 30, 2008 at 9:46 PM, Chris Hoffman <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Is there an alternative to the constructor arguments that need to be
>>> passed into a controller to initialize the repositories for testing?
>>> I thought removing this labor was the point of Inversion of Control?
>>>
>>>
>>> http://www.google.com/codesearch?hl=en&q=show:cPgO18fR3ls:HSLBCsEYdUs:cPgO18fR3ls&sa=N&ct=rd&cs_p=http://sutekishop.googlecode.com/svn&cs_f=trunk/Suteki.Shop/Suteki.Shop.Tests/Controllers/BasketControllerTests.cs
>>>
>>> Thanks for your thoughts.
>>>
>>> --
>>> "Injustice anywhere is a threat to justice everywhere."
>>> Martin Luther King, Jr.
>>>
>>>
>>
>>
>>
>> --
>> Ken Egozi.
>> http://www.kenegozi.com/blog
>> http://www.musicglue.com
>> http://www.castleproject.org
>> http://www.gotfriends.co.il
>>
>> >>
>>
>
>
>
> --
> "Injustice anywhere is a threat to justice everywhere."
> Martin Luther King, Jr.
>
--
"Injustice anywhere is a threat to justice everywhere."
Martin Luther King, Jr.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---