2013年2月1日

首次开通cnblogs的博客,分享MVC伙伴类的写法

摘要: 首先引用system.System.ComponentModel.DataAnnotations添加伙伴类的标签[MetadataType(typeof(userValid))]public partial class users(){}public class userValid(){ [StringLength(16,ErrorMsg="用户名不能超过16位长度")] public string code{get;set;} .....} 阅读全文

posted @ 2013-02-01 22:02 rgwybb 阅读(171) 评论(0) 推荐(0) 编辑

导航