Questions tagged [servicestack-autoquery]
40 questions
4
votes
1 answer
ServiceStack - Force generation of Typescript types for certain classes
I'm working with a backend primarily focused on a ServiceStack API and a Typescript frontend (with the ServiceStack JsonServiceClient) interacting with it. This is a large project, so the ability to scale is quite important, and our goal is to have…

joh04667
- 7,159
- 27
- 34
3
votes
1 answer
DateTime property issue when using servicestack autoquery
Thanks Mythz for providing such an amazing and powerful framework. However, I encountered the DateTime property rendered like this "/Date(1543681261000-0000)/" instead of "2019-03-25T12:50:3000" by using servicestack autoquery. I couldn't find any…

Steven Li
- 754
- 1
- 8
- 16
3
votes
1 answer
ServiceStack AutoQuery synthetic field
In the Northwind example's Customer DTO there is a field Email that is synthetic -- i.e. it doesn't come from the database. Code here:…

specimen
- 1,735
- 14
- 23
2
votes
1 answer
ServiceStack AutoQuery AutoFilter Like operand
I am trying to implement SQL Like operator using AutoFilter attribute. Tried the below code,
[AutoFilter(field:"Name", Template = "{Field} like {Value}", ValueFormat = "%{0}%")]
and the transformed SQL Expression looks like this (from SQL…

Raajkumar
- 857
- 2
- 13
- 26
2
votes
1 answer
Can OrmLite specify foreign key to an attribute other than the primary key
I have a table structure where a foreign key from Employee table references something other than the primary key of the Department table. This is for historical reasons, so that's just the way it is.
This works: q.Join((e, d) =>…

specimen
- 1,735
- 14
- 23
2
votes
1 answer
ServiceStack AutoQuery warning about missing property
When I query an AutoQuery service (regular GET request), I get a warning in the log, even if the request works fine. The warning looks like this, for URL: https://localhost:5001/employees?BirthDate%3E=1950-01-01
info:…

specimen
- 1,735
- 14
- 23
2
votes
1 answer
Change Autoquery return type in DTO generation
I want to return a custom class from my custom AutoQuery endpoint that inherits QueryResponse but adds a few extra properties.
public class WritingAssignmentBlogLookUpResponse : QueryResponse, IResponse
{
public bool Success { get;…

Guerrilla
- 13,375
- 31
- 109
- 210
2
votes
1 answer
Can AutoQuery return a single item (not list)
When I add a type to AutoQuery, with:
[Route("/templates")]
public class SearchTemplates : QueryDb
{
public int? Id { get; set; }
public string Name { get; set; }
}
then I can query this object by Id or Name (or whatever other…

specimen
- 1,735
- 14
- 23
2
votes
1 answer
Servicestack autoquery custom convention doesn't work with PostgreSQL
I have defined new implicit convention
autoQuery.ImplicitConventions.Add("%WithinLastDays", "{Field} > NOW() - INTERVAL '{Value} days'");
The problem is that for postgres connection the query is wrong translated into
WHERE "TABLE"."FIELD" > NOW() -…

marcinn
- 1,879
- 2
- 22
- 46
2
votes
1 answer
ServiceStack AutoQuery into custom DTO
So, I'm working with ServiceStack, and know my way around a bit with it. I've used AutoQuery and find it indispensable when calling for straight 'GET' messages. I'm having an issue though, and I have been looking at this for a couple of hours. I…

StratMN
- 161
- 8
2
votes
1 answer
AutoQuery insight needed
So, I'm working with ServiceStack and love what it offers. We've come to a point where I'm needing to implement a queryable data API... prior to my coming to this project, a half backed OData implementation was done. I'd rather not try and weed…

StratMN
- 161
- 8
2
votes
1 answer
ServiceStack AutoQuery and Field Term Or
I am trying to change a few fields on an autoquery to query using or (it is a search box that is searching many fields). This doesn't seem to work although according to the documentation it should.
public class PropertyGet :…

lucuma
- 18,247
- 4
- 66
- 91
2
votes
1 answer
ServiceStack AutoQuery and [Authenticate] Attribute
I'd like to enforce authentication on some auto querys.
[Authenticate]
public class BusinessEntitiesService : QueryDb
{
}
Here's my issue. The above class is in my ServiceModel project... in order to add the…

Chris Klepeis
- 9,783
- 16
- 83
- 149
1
vote
0 answers
ServiceStack AutoQuery not working with Code First approach
I already use ServiceStack OrmLite for quering my database, but now I want to create some CRUD API's myself. I have a separate project where my POCO's are declared with the ServiceStack DataAnnotations.
An example class of my POCO project:
…

Nesse
- 373
- 4
- 14
1
vote
1 answer
How can i execute filter from our JSON filter JSON?
I have a vue3 datagrid and I want to fill the data in this grid with filter by API. At the same time, I want to send the filter fields in the grid to the API as JSON and execute them according to this filter on the API side. How can I do this with…

stiqma
- 33
- 6