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…
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