摘要: 在MVC的项目中,我们通常情况下,为了方便(偷懒),会直接使用 !ModelState.IsValid 来判断实体的验证是否正确,但是这样对于用户的体验是不好的,当填写的内容比较多的时候,用户需要自己一个一个查找问题所在,然后修改。如何既能使用ModelState(偷懒),又能够让用户知道自己输入错 阅读全文
posted @ 2018-08-04 10:59 keke..lele 阅读(333) 评论(0) 推荐(0) 编辑
摘要: public class ExportAttribute : Attribute { public ExportAttribute(bool needExport = true) { _NeedExport = needExport; } private bool _NeedExport { set 阅读全文
posted @ 2018-08-04 10:44 keke..lele 阅读(2149) 评论(2) 推荐(0) 编辑