EF 取出demical数据,但需要去点小数,排序

try
            {
                BasePaperWeightDAL.Get(o => o.IsDeleted == false && o.IsEnabled == true).OrderByDescending(o => o.Sort).
                    ThenByDescending(o => o.CreateTime).ToList().ForEach(o =>
                    {
                        if (o.WeightValue != null)
                        {
                            o.WeightValue = Convert.ToInt32(o.WeightValue);
                        }
                        LstBasePaperWeight.Add(o);
                    });
            }
            catch (Exception ex)
            {
                
            }

  

posted @ 2017-12-08 10:28  狗蛋学编程  阅读(339)  评论(0编辑  收藏  举报