摘要:
首先我们来做一个比较,自定义Model加Annotation,如表1所示:图表1:Product Class 的定义Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 public class Product 2 { 3 [DisplayName("Product Name")] 4 [Required(ErrorMessage="Product Name is Required.")] 5 [Str 阅读全文
摘要:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->staticclassProgram{staticvoidMain(string[]args){string[]array={"aaa","bb","c"};foreach(variteminarray.AsQueryable().OrderBy("Length")){Console.WriteLine(item); 阅读全文