using ServiceStack; | |
var client = new JsonServiceClient("{BaseUrl}"); | |
//Call {Domain} APIs by sending typed Request DTO's | |
var response = client.Get(new RequestDto { }); |
In most cases INSERT's in OrmLite is as straight forward as passing the POCO you want inserted:
OrmLite provides a couple of different ways to handle Inserting records with AutoIncrementing Ids:
In its most simple form, updating a model on its own without any filter conditions will
update every field, except the Id
which is used to limit the update to itself.
Otherwise you can specify a custom filter condition using a typed expression:
Deleting rows in OrmLite is simple and straight-forward with APIs to support multiple use-cases including deleting by entity, by Id, by lambda expression, by SqlExpression, or Custom SQL expression:
As well as API's for deleting all or multiple rows:
OrmLite provides Typed APIs for modifying Table Schemas that makes it easy to inspect the state of an RDBMS Table which can be used to determine what modifications you want to apply to it to upgrade it to the latest version:
As a code-first ORM, creating tables is effortless in OrmLite that uses your POCO Type definition to generate RDBMS Table schemas that cleanly maps .NET data types 1:1 to the most appropriate RDBMS column definition:
OrmLite also supports persisting rich complex types which are blobbed by default or you can use the [Reference]
support to persist Nested Complex Types in their own Table Definitions:
using System.Linq; | |
using ServiceStack; | |
using ServiceStack.Text; | |
var client = new JsonServiceClient("{BaseUrl}"); | |
//Call {Domain} APIs by sending typed Request DTO's | |
var response = client.Get(new RequestDto { }); | |
//response.PrintDump(); // Uncomment to Print Response to Console |
You can also view OrmLite's Documentation to learn about these features now.
Add ServiceStack Reference is ServiceStack's feature integrating with most major IDE's for generating typed DTO's from the URL of a remote ServiceStack instance so they can be easily consumed from C#, TypeScript, Swift, Java, Kotlin, F# and VB.NET Mobile, Desktop and Web Apps. The integrated support in Gistlyn extends their reach even further where anyone with just a modern web browser on their Desktop or iPad can add a typed reference and explore your ServiceStack Services using C# and LINQ in seconds.