I have an app running in the browser. The client is fetching data from the server using .net core WEBAPI. normal REST requests. Something like a criteria parser...
I wonder if there is a way to pass search criteria from the client to the server in order to query the database. converting a get request to a ormlite query is possible but I wonder if it's already done... I'm talking about serverside implementation, paging, sorting, searching (and,or) and so on...
I have a license for ormlite only.
Thanks
This sounds almost exactly like what ServiceStack's AutoQuery already does, where it's able to implement the Query Service for your RDBMS Table from just a Request DTO definition, e.g:
[Route("/movies")]
public class FindMovies : QueryDb<Movie>
{
public string[] Ratings { get; set; }
}
Where you will then be able to call your Service with either a Typed Service Client:
var movies = client.Get(new FindMovies { Ratings = new[]{"G","PG-13"} })
Or via a HTTP request:
/movies?ratings=G,PG-13