Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / main.cs
Last active August 3, 2023 18:13
Redis Todo demo
using System;
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.Redis;
using ServiceStack.DataAnnotations;
var redisManager = new RedisManagerPool("localhost:6379");
var redis = redisManager.GetClient();
public class Todo
@gistlyn
gistlyn / main.cs
Last active November 10, 2020 13:31
OrmLite Todo demo
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
var dbFactory = new OrmLiteConnectionFactory(":memory:", SqliteDialect.Provider);
var db = dbFactory.Open(); // Open ADO.NET DB Connection
public class Todo
@gistlyn
gistlyn / main.cs
Last active June 24, 2017 00:18
PocoDynamo Todo Demo
using System;
using Amazon;
using Amazon.DynamoDBv2;
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.Aws.DynamoDb;
using ServiceStack.DataAnnotations;
var awsDb = new AmazonDynamoDBClient("keyId","key",new AmazonDynamoDBConfig { ServiceURL="http://localhost:8000"});
var db = new PocoDynamo(awsDb);
@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

@gistlyn
gistlyn / index.md
Last active August 26, 2016 14:59
Creating Collections

Gistlyn Collections

In our mission to make Gistlyn an immensely useful and collaborative learning tool for exploring any .NET library, Gistlyn includes a streamlined UX for editing Collections making it easier than ever to create Live Docs which we believe is the best way to learn about a library, mixing documentation and providing a live development experience letting developers try out and explore what they've just learned without losing context by switching to their development environment and setting up new projects to match each code sample.

Gistlyn makes it easy to share C# snippets with colleagues or reporting an issue to library maintainers with just a URL or a saved Gist ID which anyone can view in a browser at gistlyn.com or on their

@gistlyn
gistlyn / index.md
Last active August 30, 2016 19:27
Snapshots

Gistlyn Snapshots

A nice feature we can provide in Gistlyn thanks to it being a light web-based IDE, is Snapshots.

Snapshots lets you save the entire client state of your current workspace (excluding your login info) and generates a url which you can use to either revert back to the snapshot yourself or send to someone else so they can load your entire workspace and start working from the point when the snapshot was taken.

Capturing a Snapshot

@gistlyn
gistlyn / index.md
Last active June 28, 2017 08:30
Gistlyn Downloads

Gistlyn on your Desktop

In addition to a running as an ASP.NET Web App, Gistlyn is also available as a self-hosting Winforms Desktop or cross-platform OSX/Linux/Windows Console App - packaged using the tooling in ServiceStack's React Desktop Apps VS.NET Template.

Running Gistlyn on your Desktop utilizes the full resources of your CPU for faster build and run times and as C# Gists are run locally they'll also be able to access your RDBMS and other Networked Servers and Services available from your local Intranet.

@gistlyn
gistlyn / index.md
Last active August 18, 2016 19:00
Test Collection Edit

This is a New Link

is a fast, simple, typed code-first ORM for .NET supporting most popular RDBMS's. For this interactive tour we'll use OrmLite's cross-platform In Memory SQLite database which can be referenced in Gistlyn by copying the packages.config NuGet generates after it installs it with:

> Install-Package ServiceStack.OrmLite.Sqlite.Mono

@gistlyn
gistlyn / index.md
Last active August 25, 2016 16:31
New Collection

Title

@gistlyn
gistlyn / Startup.cs
Last active November 23, 2017 20:57
.NET Core RazorRockstars Startup.cs
using Funq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.Host.Handlers;
using ServiceStack.Logging;