コード例 #1
0
        public bool UpdateFields(TEntity instance, params Expression <Func <TEntity, string> >[] expressions)
        {
            var propNames = new List <string>();

            foreach (var e in expressions)
            {
                MemberExpression memberExpression = (MemberExpression)e.Body;
                propNames.Add((string)memberExpression.GetPropValue(nameof(MemberExpression.Member)).GetPropValue("Name"));
            }
            return(UpdateFields(instance, propNames.ToArray()));
        }