123456789101112131415 |
- using System;
- using System.Linq.Expressions;
- namespace VCommon.VApplication.Linq.Expressions
- {
- internal static class ExpressionHelper
- {
- public static Expression<Func<T, TV>> Property<T, TV>(string propertyName)
- {
- var p = Expression.Parameter(typeof(T));
- var body = Expression.Property(p, propertyName);
- return Expression.Lambda<Func<T, TV>>(body, p);
- }
- }
- }
|