c# - ParseLambda not resolving -


i integrating validation code have placed in class library having issues resolving parselambda

 protected virtual void setdecimalmaxvalue<tobject>(idbcontext dbcontext)  {             var localizationservice = enginecontext.current.resolve<ilocalizationservice>();              if (dbcontext == null)                 return;              var dbobjecttype = typeof(tobject);              var names = typeof(t).getproperties()                 .where(p => p.propertytype == typeof(decimal))                 .select(p => p.name).toarray();              var maxvalues = dbcontext.getdecimalmaxvalue(dbobjecttype.name, names);             var expression = maxvalues.keys.todictionary(name => name, name => dynamicexpression.parselambda<t, decimal>(name, null));              foreach (var expr in expression)             {                 rulefor(expr.value).isdecimal(maxvalues[expr.key]).withmessage(string.format(localizationservice.getresource("nop.web.framework.validators.maxdecimal"), maxvalues[expr.key] - 1));             }  } 

i'm using following, believe correct use parselambda

using system.linq;     using fluentvalidation;     using solitude.data;     using system.linq.expressions;     using solitude.core.infrastructure;     using solitude.framework.viewengines.razor; 

i tried following , added install-package system.linq.dynamic -version 1.0.7 project still not resolving tried calling such

 var expression = maxlength.keys.todictionary(name => name, name => system.linq.expressions.dynamicexpression.parselambda<t, string>(name, null)); 

i added following well

 using system.linq.expressions;  using system.linq.dynamic; 


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -