Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / hello.rb
Last active March 17, 2024 01:16
Ruby Hello World
puts "Hello World!"
@gistlyn
gistlyn / Configure.Db.Migrations.cs
Last active March 6, 2024 16:19
Use OrmLite with SQLite
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using MyApp.Data;
using MyApp.Migrations;
using MyApp.ServiceModel;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using MyApp.Data;
using MyApp.Migrations;
using MyApp.ServiceModel;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using MyApp.Data;
using MyApp.Migrations;
using MyApp.ServiceModel;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using MyApp.Data;
using MyApp.Migrations;
using MyApp.ServiceModel;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
@gistlyn
gistlyn / mix.md
Last active March 6, 2024 08:30
Mix Gists

Available Gists

Projects

  • console-cs {to:'.'} project,C# C# .NET 8 Console App
  • console-fs {to:'.'} project,F# F# .NET 8 Console App
  • console-vb {to:'.'} project,VB VB .NET 8 Console App
  • console-ss {to:'.'} project,S# #Script Console App
  • console-lisp {to:'.'} project,Lisp #Script Lisp Console App
  • init {to:'.'} project,C# Empty .NET 8 ServiceStack App
@gistlyn
gistlyn / Configure.Db.Migrations.cs
Last active March 6, 2024 07:31
Use OrmLite with SQL Server
using MyApp.Migrations;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
namespace MyApp;
// Code-First DB Migrations: https://docs.servicestack.net/ormlite/db-migrations
@gistlyn
gistlyn / Configure.Cors.cs
Last active February 20, 2024 09:41
Configure support for CORS
[assembly: HostingStartup(typeof(MyApp.ConfigureCors))]
namespace MyApp;
public class ConfigureCors : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices(services =>
{
services.AddCors(options => {
using Funq;
using ServiceStack;
using MyApp.ServiceInterface;
[assembly: HostingStartup(typeof(MyApp.AppHost))]
namespace MyApp;
public class AppHost : AppHostBase, IHostingStartup
{
@gistlyn
gistlyn / Configure.Mq.cs
Last active February 14, 2024 09:13
Use AWS SQS MQ
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ServiceStack;
using ServiceStack.Messaging;
using ServiceStack.Aws;
using ServiceStack.Aws.Sqs;
[assembly: HostingStartup(typeof(MyApp.ConfigureMq))]
namespace MyApp