如何在 ASP.NET 中创建自定义容器

发布于 2024-09-25 08:29:06 字数 130 浏览 0 评论 0原文

我不确定我是否有这个权利......但是任何人都可以向我指出一个资源,该资源展示了如何在 ASP.NET(特别是 MVC)中创建自定义容器。我所说的容器是指在会话期间全局可用的容器,如 DI 容器(即 Ninject 或 UNity)。提前致谢。

I am not sure if I have this right ... but can anyone point me to a resource that shows how to create a custom container in ASP.NET (Specifically MVC). By container I am talking about a container that is globally available during a session like a DI container (i.e. Ninject or UNity). Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┈┾☆殇 2024-10-02 08:29:06

首先,我假设您不知道一些可用资源来使其比创建新容器更容易:您可以使用 Mvc Turbine< /a> 已经支持使用任何类型的容器,实际上它实现了一个完整的Web应用程序。

如果您已经知道:
好吧,我认为你的问题是:如何制造汽车!
制作容器没有特定的方法,我告诉你!这是一项艰巨的任务(不是不可能的任务),但它是一个漫长的旅程,我不知道是否值得从头开始,但如果你坚持,你至少可以尝试修改现有的,就像你说的,UNITY ,或忍者。但是我在我的 Mvc 应用程序中使用 Windsor Castle 容器,这非常棒,
正如你所说,它可以在会议期间使用

First i assume that you don't know some available resources to make it easier than create a new container: you can use Mvc Turbine which is already supports using any kind of container, in fact it implements a complete Web Application.

if you already know that:
well, i think that your question likes: how to make a car !
there is no specific way to make a container, and i tell you what!! it is a hard mission (not mission impossible) but it very long journey,i don't know if it worth to start from scratch, but if you insist, you can at least try to modify an existing one, like you said, UNITY, or Ninject. however I'm using Windsor Castle Container with my Mvc application and it's great,
and as you said it is available to use during session

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文