Feature Request <context>.Getxxx

Hello Radzen Team,
i have a feature request about the .Get(new Query(){...}) methods
like thisone:

public async Task<IQueryable<Models.Trentdb.Artikelgruppe>> GetArtikelgruppes(Query query = null)

In "Invoke data source method" it is not possible to assign a Property as Parameter. Only "$filter,$orderby,$top,$skip,$expand" is allowed.

It were great to have the choice to use a query object/property as a parameter. So the Query object is reusable. e.g. fo reloading of Dropboxes, ect. This prevents that the Query(){Filter = "...", OrderBy="..."} must be typed again.

Kind regards

Hi Thomas,

This method is designed to get collection of database entities. It's not possible add any additional parameters except query parameters.

Hi @enchev,
sorry for the bad explanation :frowning:

I dont want an other parameter. I would love to give the Query Parameter as an object.
Now it looks like this when defining an "$orderby" for example:

var trentdbGetFahrzeugartsResult = await Trentdb.GetFahrzeugarts(new Query() { OrderBy = $"Bezeichnung asc" });

what i want is the possibility to do that:

var trentdbGetFahrzeugartsResult = await Trentdb.GetFahrzeugarts(query);
Where "query" is of class "Query". Then i can set property "query" once and have a variable that can be reused.



I'm afraid that this is not possible. As I said in my previous reply this method is automatically generated by Radzen and the only purpose is to query collection of entities. As far as I can see you are looking for Custom Methods where you can define any parameters:

Hi @enchev,
yes. i know a custom method can do the same.
like this:

protected Query query = new Query()
                            OrderBy = $"Bezeichnung asc"
protected async Task GetFahrzeugarten()
    var trentdbGetFahrzeugartsResult = await Trentdb.GetFahrzeugarts(query);
    getFahrzeugartenResult = trentdbGetFahrzeugartsResult;

I only hoped i can do that with less effort and in the designer.
Setting a property and give the property as parameter in "invoke data source method".

I will continue to write custom methods for this.

Thanks for your explanation

1 Like