07 2013 档案
MVC3 FAQ
摘要:1. html helper 可以缩写代码的,下面2段代码是相同效果@Html.DropDownList("TourList") 2. 用form提交的entity.id, entity.name 可以组装成controller的方法的entity类参数,但是对象或者集合做参数,mvc好像是不能自动组装的. 例如下面的Tour字段和FromCity,BackCity字段 public class TourInstance: Entity { public virtual string Code { get; set; } public virtual T... 阅读全文
posted @ 2013-07-22 02:53 Gu 阅读(180) 评论(0) 推荐(0) 编辑
NHibernate 3.2+的 Map by Code 实例
摘要:NHibernate 3.2+的 Map by Code 的文档真的很少,除了Fabio Maulo的2篇blog(顺带说李永京的翻译,没任何新的研究). 让人感慨NH的没落, 也许从没有流行过. 在没有文档的时候尝试map by code, 非常痛苦. 当然像这种this.Property(p =... 阅读全文
posted @ 2013-07-17 01:07 Gu 阅读(412) 评论(0) 推荐(0) 编辑