ASP.NET MVC 1 和 2 在 Mono 2.4 上使用 Fluent NHibernate [英] ASP.NET MVC 1 and 2 on Mono 2.4 with Fluent NHibernate

查看:24
本文介绍了ASP.NET MVC 1 和 2 在 Mono 2.4 上使用 Fluent NHibernate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 ASP.NET MVC 创建一个应用程序,它应该在 mono 2.4 下运行(编译将在 Windows 机器上完成).有没有人对此感到幸运?这是我已经尝试过的:

I'd like to create an application using ASP.NET MVC, that should run under mono 2.4 (compiling will be done on a Windows box). Has anyone getting luck with this? Here is what I've already tried:

  1. 单声道上的 ASP.NET MVC,没有任何持久性模型支持,并使用 nhaml 作为视图引擎
  2. S#aml 架构,恕我直言,这是一个相当不错的框架,但它太依赖于在单声道(如 Windsor)下效果不佳的东西

第一部分工作正常,我没有遇到任何大问题.但我无法让第二部分工作.似乎它对 Castle.Windsor 的依赖破坏了整个单声道支持(但也可能有其他部分).

The first part worked fine, I didn't encounter any major problems. But I couldn't get the second part working. It seems it's dependency on Castle.Windsor breaks the whole mono support (but there might be other parts too).

因此我决定创建一个替代框架,它借鉴了 s#arp-architecture 的一些想法,但旨在在单声道下工作(如果我能够做到这一点,我将向社区发布它当然).控制器和视图部分工作正常(虽然这里没有太多魔法,它们一直在工作),但在我开始持久性部分的工作之前我有一些问题:

Therefore I decided to create an alternative framework, that borrows some of the ideas of s#arp-architecture, but designed to be working under mono (and if I'm able to do this I'll release it for the community of course). The controller and view part is working fine (not much magic here though, they have been always working), but I have some questions before I start job on the persistence part:

  • 哪些 NHibernate 版本在单声道下运行?我听说 1.2 工作正常.2.0.1/2.1 测试版在单声道下是否工作?
  • Fluent.NHibernate 和 NHibernate.Linq 是否在单声道下工作?(对于后者,它似乎需要一些在单声道中不可用的依赖项)
  • 在mono 下有什么好的替代方案可以支持NHibernate 的持久性?

替代问题:

  • 有没有已经支持 mono+persistence+asp.net mvc 的框架,还是我是第一个想到这个的人?
  • 如果您已经这样做了:您对稳定性/可用性有何看法?

感谢您的回答

更新了框架以支持 ASP.NET MVC 2:http://shaml.sztupy.hu/

Updated the framework to support ASP.NET MVC 2: http://shaml.sztupy.hu/

推荐答案

好的.我开始了一个新项目,它结合了 S#arp Architecture 中最好的东西,在单声道上工作.它没有使用 T4Toolkit,而是使用 ruby​​ 脚本来完成生成工作,就像使用 rails 或 merb 一样.

Okay. I started on a new project that incorporates the best from S#arp Architecture with stuff, that work on mono. Instead of T4Toolkit it uses a ruby script to do the generation job, just as with rails or merb.

要使用从 github 安装 shaml gem:

To use install the shaml gem from github:

gem install shaml

然后创建一个新的应用程序:

Then create a new application:

shaml generate app AppName

并创建资源:

shaml generate resource NewRes "name:string;date:DateTime"

S#aml 架构项目主页:http://shaml.sztupy.hu/

S#aml Architecture project homepage: http://shaml.sztupy.hu/

GitHub 项目:http://github.com/sztupy/shaml/tree/master

这篇关于ASP.NET MVC 1 和 2 在 Mono 2.4 上使用 Fluent NHibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆