Skip to content

Instantly share code, notes, and snippets.

gistlyn

Block or report user

Report or block gistlyn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.md

Gistlyn - Your C# Gist IDE in the Sky!

Gistlyn lets you create, run and share your executable C# Github Gists. Powered by Roslyn C# Scripting, all you need is a main.cs file, here's Hello World:

var name = "World";
var greeting = $"Hello, {name}!";
@gistlyn
gistlyn / main.cs
Last active Jul 9, 2017
Hello World!
View main.cs
//Variables in top scope can be inspected in preview inspector
var name = "World";
var greeting = $"Hello, {name}!";
@gistlyn
gistlyn / main.cs
Last active Aug 8, 2019
Hello NuGet!
View main.cs
using ServiceStack;
using ServiceStack.Text;
var name = "NuGet";
class Greeting
{
public string Message { get; set; }
}
@gistlyn
gistlyn / links.md
Last active Aug 14, 2016
Friendly names for links to Gistlyn gists or collections
@gistlyn
gistlyn / data.cs
Last active Aug 8, 2019
OrmLite Reference Test Data
View data.cs
using System.Collections.Generic;
using System.Data;
using ServiceStack;
using ServiceStack.OrmLite;
using ServiceStack.DataAnnotations;
public class Artist
{
public int Id { get; set; }
public string Name { get; set; }
@gistlyn
gistlyn / main.cs
Last active Jul 25, 2016
Add ServiceStack Reference
View main.cs
using ServiceStack;
var client = new JsonServiceClient("{BaseUrl}");
//Call {Domain} APIs by sending typed Request DTO's
var response = client.Get(new RequestDto { });
@gistlyn
gistlyn / main.cs
Last active Oct 9, 2019
Simple OrmLite CRUD demo
View main.cs
using System;
using System.Collections.Generic;
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.Sqlite;
using ServiceStack.DataAnnotations;
public class User
{
@gistlyn
gistlyn / main.cs
Last active Aug 8, 2019
New Private Gist
View main.cs
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
public class GithubRepository
{
public string Name { get; set; }
public string Description { get; set; }
public string Url { get; set; }
public string Homepage { get; set; }
@gistlyn
gistlyn / main.cs
Last active Jul 31, 2016
Add ServiceStack Reference
View main.cs
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 / data.cs
Last active Aug 8, 2019
SELECT SqlExpression examples
View data.cs
using System.Collections.Generic;
using System.Data;
using ServiceStack;
using ServiceStack.OrmLite;
using ServiceStack.DataAnnotations;
public class Artist
{
public int Id { get; set; }
public string Name { get; set; }
You can’t perform that action at this time.