Search

You searched for the word(s): userid:695883

Matching Posts

  • Re: How do I do unit tests?

    There is also a really good webcast on dependency injection with asp.net mvc. Have a look. http://blog.wekeroad.com/mvc-storefront/mvcstore-part-13/
    Posted to ASP.NET MVC (Forum) by katokay on 6/23/2008
  • Re: How do I do unit tests?

    My apologies, I've been using dependency injection for a while now and forget sometimes it's not out of the box. Take a look at MvcContrib it has a lot of useful utilities and has a controller factory that will inject your dependencies using just about any IoC library available. Like Unity, StructureMap, Ninject, etc. Take a look at the unit tests and samples in the source control. It will show you how to hook things up. Another good resource for samples is Code Camp Server. http://codecampserver
    Posted to ASP.NET MVC (Forum) by katokay on 6/21/2008
  • Re: How do I do unit tests?

    I typically wrap a dependency around an interface injected into our controller for things that are accessing things like HttpContext.Current.User.Identity.Name. There may be other ways, but moving all those dependencies behind a decoupled implementation also makes things for your tests easy to mock.
    Posted to ASP.NET MVC (Forum) by katokay on 6/21/2008
  • Re: A bit of samples on MvcContrib

    You might get more help if you post to the MvcContrib discussion group. However, a good place to start is the unit tests and samples included with the source. http://groups.google.com/group/mvccontrib-discuss
    Posted to ASP.NET MVC (Forum) by katokay on 6/5/2008
  • Re: AutoTypeView with Preview3

    I would take a look after the weekend. I believe they've estimated having everything over to Preview 3 by then.
    Posted to ASP.NET MVC (Forum) by katokay on 5/29/2008
  • Re: One Strongly Typed ViewData to rule them all?

    var someValue = ViewData.GetOrDefault<bool>("SomeKey", false); MVCContrib helper extensions. It's not really all that difficult. You can pull the values for your view perhaps at the top of the page, and use the variable throughout if necessary. It never really feels like using a dictionary from then on.
    Posted to ASP.NET MVC (Forum) by katokay on 5/22/2008
  • Re: One Strongly Typed ViewData to rule them all?

    I forget, what's wrong with using a dictionary?
    Posted to ASP.NET MVC (Forum) by katokay on 5/22/2008
  • Re: Passing anonymous types to the ViewData object

    You can do this with the MVCContrib AutoTypeViewPage. You would still need a strongly typed ViewData object and as long as the names of your anonymous types properties, or Dictionary keys match it will work. Although in practice for us at least the strongly typed view pages don't scale very easily (or at least for now they dont), and we kind of prefer utilizing the ViewDataExtensions, also in MVCContrib.
    Posted to ASP.NET MVC (Forum) by katokay on 4/25/2008
  • Re: Complex, possibly CRAZY! Routes Question

    Another possible alternative could be to setup rewrite rules similar to mod rewrite that would actually under the covers request the url /AdminUsersController/{action}/{args}. Not a perfect solution because what you described might be a nice feature to have. Something like {{0}controller}/{{1}controller}/{action}/{args} I could see being very useful.
    Posted to ASP.NET MVC (Forum) by katokay on 4/22/2008
  • Re: MVC application doesnt run under IIS 5.1

    For a couple months we used 5.1 with MVC. Although we've since moved to IIS 7 so I can't recall the settings it took. Although, I don't think it was anything more than mapping the extension, and setting up rewrite rules because we still wanted the controller name to be displayed without the mvc extension.
    Posted to ASP.NET MVC (Forum) by katokay on 4/21/2008
Page 1 of 5 (50 items) 1 2 3 4 5 Next >