摘要: 相当于ToDictionary只能一对一,ToLookUp可以一对多,所以Dictionary<string,string[]>其实应该用LookUp<string,string> using (var context = new KTStoreModel()) { context.Database 阅读全文
posted @ 2022-03-02 17:17 江境纣州 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1、SPList class SPList<T> : List<T> { public decimal Average(Func<T, decimal> s) { var list = (List<T>)this; decimal price = list.Average(s) * decimal. 阅读全文
posted @ 2022-03-02 16:17 江境纣州 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1、model 注意点1:List<ProductSet> Products的Products必须继承ICollection<T>; 注意点2:ProductSet.CategoryID属性,要XXXXXID; [Table("ProductSet")] public class ProductSe 阅读全文
posted @ 2022-03-02 14:17 江境纣州 阅读(90) 评论(0) 推荐(0) 编辑