摘要: 对应文章:http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-validation-to-the-model【本章目标】 为Movie Model 添加验证,当Movie创建或更改时,能够起到作用。【Keeping Things DRY】 指的还是MVC中的代码重用逻辑,这里将其总结为" Don't Repeat Yourself ",简称DRY 验证规则添加到Model模块的类中,但是可以在项目的任意位置调用。【操作步骤】一、向Movie Model中添加验证 阅读全文
posted @ 2013-06-16 15:51 chutianshu_1981 阅读(6552) 评论(3) 推荐(3) 编辑