We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to get sql query from RuleModel in my Api service?


I Use Syncfusion query builder in my project.

I want in my blazor client side send json of RuleModel to api server and in api server i deserialize and get sql query from RuleModel.

I try this code:

var queryBuilder = new SFQueryBuilder();
var ruleModel = _jsonSerializer.Deserialize(ruleJson);
var query = queryBuilder.GetSqlFromRules(ruleModel);

When run this code i get NullReferenceException.

In my project i install Syncfusion.Blazor.QueryBuilder ver:

1 Reply

YA YuvanShankar Arunagiri Syncfusion Team October 26, 2022 04:07 AM

Hi Moh Rad,

We have validated your reported query and unable to replicate the sample (with your provided code) based on your requirement. So please share the below details,

  • Share the issue reproducible sample or replicate the issue in our sample.

  • Share the video demonstration of issue replicable.

Please provide the above requested information, based on that we will check and provide you a better solution quickly.


YuvanShankar A

Attachment: QueryBuilderSample_e4d83a58.zip

Live Chat Icon For mobile
Up arrow icon