Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / main.cs
Last active July 25, 2016 08:20
Add ServiceStack Reference
using ServiceStack;
var client = new JsonServiceClient("{BaseUrl}");
//Call {Domain} APIs by sending typed Request DTO's
var response = client.Get(new RequestDto { });
@gistlyn
gistlyn / index.md
Created July 26, 2016 05:36
OrmLite Custom SQL Examples

Custom SQL Examples

@gistlyn
gistlyn / index.md
Last active July 28, 2016 06:59
OrmLite INSERT Examples
@gistlyn
gistlyn / index.md
Last active July 28, 2016 07:35
OrmLite UPDATE Examples

UPDATE Examples

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:

UpdateOnly

@gistlyn
gistlyn / index.md
Last active July 28, 2016 08:13
OrmLite DELETE Examples

DELETE Examples

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:

@gistlyn
gistlyn / index.md
Last active July 29, 2016 07:10
Modify Table Schema Examples

Modify Schema Examples

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:


@gistlyn
gistlyn / index.md
Last active July 29, 2016 07:12
OrmLite CREATE Table Examples

CREATE Table Examples

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:

@gistlyn
gistlyn / main.cs
Last active July 31, 2016 07:04
Add ServiceStack Reference
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
@gistlyn
gistlyn / index.md
Last active July 31, 2016 22:04
OrmLite's Miscellaneous Features

Coming Soon!

You can also view OrmLite's Documentation to learn about these features now.

Other Features

Async APIs

@gistlyn
gistlyn / index.md
Last active August 11, 2016 11:05
Add ServiceStack Reference

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.

Add a ServiceStack Reference via Url