Code Monkey home page Code Monkey logo

Comments (5)

ENikS avatar ENikS commented on June 14, 2024

What exactly is wrong with it?

from aspnet-mvc.

nikaburu avatar nikaburu commented on June 14, 2024

It simply does not work, each request runs under an application container (instead of own child container).

One way to fix for me is to use PerRequestLifetimeManager in my code, but I don't want dependency on this mvc lib out of my web layer. And it seems wrong do not use build-in HierarchicalLifetimeManager.

The other way is to have child container created for each requests by default with this lib, even if PerRequestLifetimeManager is not used. Then HierarchicalLifetimeManager may be used.

Btw, it works in this way with your integration to asp.net core, where each request is scoped and child container created.

Todo:

  1. mark PerRequestLifetimeManager as obsolete (and remove in future versions)
  2. create a child container per each request (see link above how it may be done)

from aspnet-mvc.

nikaburu avatar nikaburu commented on June 14, 2024

Btw, one of the useful feature of Unity.Mvc5 that is does not require to add asp net module manually on appstart but nicely hidden in the lib: https://github.com/devtrends/Unity.Mvc5/blob/master/Unity.Mvc5/Properties/AssemblyInfo.cs

Just less code to carry with your own app.

from aspnet-mvc.

nikaburu avatar nikaburu commented on June 14, 2024

wrong button..

from aspnet-mvc.

ENikS avatar ENikS commented on June 14, 2024

This library has nothing to do with https://github.com/devtrends/Unity.Mvc5
You might want to contact @devtrends to address it.

I would be open to merging functionality of both into this project but I would need help because I have very limited knowledge of MVC.

from aspnet-mvc.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.