Search code examples
asp.netasp.net-mvcdryioc

Set up DryIoc with an old asp.net mvc (not core)


I have an old Asp.net mvc application using Microsoft.aspnet mvc 5.2.7

I would like to use DryIoc but I could not find any example on how to use it.

I have added the DryIoc.MVC nuget but with somehow does not see any "WithMVC" extentions. Am I missing something?

  1. How do you set up DryIoc with an old asp.net mvc ?
  2. What are the correct nuget to use?

Any examples?

Also what is the difference between these two enter image description here

Thanks!


Solution

  • Use .dll package. Here is the doc listing all extensions: https://github.com/dadhi/DryIoc/blob/master/Extensions.md#extensions-and-companions

    For some reason (time passed) I could not quickly find a complete sample. There is the latest thing here https://github.com/vmrocha/dryioc.web without using any extensions. But it's fine because DryIocMvc.cs is quite small without the docs https://github.com/dadhi/DryIoc/blob/master/src/DryIoc.Mvc/DryIocMvc.cs

    There are also the tests to see the API usage https://github.com/dadhi/DryIoc/tree/master/test/DryIoc.Mvc.UnitTests