URL: https://brainlabs.ai/api/services/app/Account/RegisterUser Request: { "FirstName": "padma", "surname": "tadikonda", "emailAddress": "[email protected]", "PhoneNumber": "0000000000", "registerToken": "0f98fe57-2c85-4c80-8e84-004962316b06 ", "AffiliateId":"sampleID", "TransactionId ":"235446547-166" } please check the image
public class RequiredIfAttribute : ValidationAttribute
{
private readonly string _condition;
public RequiredIfAttribute(string condition)
{
_condition = condition;
}
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
{
Delegate conditionFunction = CreateExpression(
validationContext.ObjectType, _condition);
bool conditionMet = (bool) conditionFunction.DynamicInvoke(
validationContext.ObjectInstance);
if (conditionMet)
{
if (value == null)
{
return new ValidationResult(FormatErrorMessage(null));
}
}
return null;
}
private Delegate CreateExpression(Type objectType, string expression)
{
// TODO - add caching
LambdaExpression lambdaExpression =
System.Linq.Dynamic.DynamicExpression.ParseLambda(
objectType, typeof (bool), expression);
Delegate func = lambdaExpression.Compile();
return func;
}
}
these code we need "DynamicQuery" dll when we install core-shared libary we get the build errors in mobile projects
we are using the default culture en-GB not en in that also Abp, AbpWeb, AbpZero localization not loaded how to resolve the problem
we are using Abp.ZeroCore, Version=4.5.0.0, application version v6.9.1and English language
My applcation is ASP.NET Zero MVC core web application . solution is xxx.xxx.Web.MVC
I have added app.UseMvc(); in startup.cs class and then added the below routing attribute to action method in control to return the Model and view.
[Route("UserData")] public IActionResult UserPersonal() {
}
when i run the application the action is not finding .
not sure ASP.NET Zero MVC core support attribute routing or not
just added the below Route in action
[Route("UserPersonaldata")]
thank you aaron. will check and get back to you with status update.