Esempio n. 1
0
        private Expression <Func <TUserRole, TValue> > GetUserRoleLambda <TValue>(Mapper.UserRoleColumnType columnType)
        {
            var param        = Expression.Parameter(UserRoleType, "p");
            var memberAccess = UserRoleHelper.GetMemberAccess(param, columnType);

            return(Expression.Lambda <Func <TUserRole, TValue> >(memberAccess, param));
        }
Esempio n. 2
0
        private Expression <Func <TUserRole, bool> > GetUserRoleLambda(Mapper.UserRoleColumnType columnType, object value)
        {
            var param        = Expression.Parameter(UserRoleType, "p");
            var memberAccess = UserRoleHelper.GetMemberAccess(param, columnType);
            var content      = Expression.Constant(value);
            var equal        = Expression.Equal(memberAccess, content);

            return(Expression.Lambda <Func <TUserRole, bool> >(equal, param));
        }