zoukankan      html  css  js  c++  java
  • 当实体类属性超多时候 映射给实体类属性赋值(拉姆达+实体类映射)

        {
                                     attributeSumValue=  beforEntity.Sum(e => Convert.ToDecimal( e.GetType().GetProperties().Where(o => o.Name == attributeName).Single().GetValue(e, null)));
                                     var attributeBefName = "C" + attributeName.Substring(1, attributeName.Length - 1);
                                     item.GetType().GetProperties().Where(b => b.Name == attributeBefName).Single().SetValue(item, attributeSumValue, null);
                                        //foreach (T_GL_IncomeStatementDataUpload Entity in   beforEntity)
                                        //{
                                        //    Entity.GetType().GetProperties().Where(o=>o.Name==attributeName).Single().GetValue(Entity,null);
                                        //}

                                    }

  • 相关阅读:
    2016.11.21随笔
    2016.11.19随笔
    年月日
    导航position:absolute
    360搜索(边框)
    导航代码position:relative
    邮箱注册代码
    2016.11.18随笔
    2016.11.17随笔
    个人简历网页版代码
  • 原文地址:https://www.cnblogs.com/520cc/p/3949582.html
Copyright © 2011-2022 走看看