Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rommsen's full-sized avatar

Roman Sachse rommsen

View GitHub Profile
namespace ddd_patterns.Step6
{
public interface IPaymentService
{
public bool Pay(decimal amount, decimal vat);
}
}
using System;
using System.Data.SqlClient;
namespace ddd_patterns.Step2
{
public class OnlineTickets
{
private readonly string _connectionString;
public OnlineTickets(string connectionString)
@rommsen
rommsen / test.fsx
Created February 2, 2019 22:04
model-based-testing
#r "netstandard"
#load @"..\.paket\load\netstandard2.0\main.group.fsx"
@"Step3\Infrastructure3.fs"
@"Step3\Domain3.fs"
@"Step3\Program3.fs"
@"Step3\Tests3.fs"
open Step3.Domain
open Step3.Domain.Projections
open Step3.Program
@rommsen
rommsen / tree_building.fs
Last active January 15, 2019 20:57
Tree building mit Results
module TreeBuilding
type Record = { RecordId: int; ParentId: int }
type Tree =
| Branch of int * Tree list
| Leaf of int
let recordId t =
match t with
| Branch (id, c) -> id
@rommsen
rommsen / intro.fsx
Created May 30, 2018 07:12
Meetup1
// Syntax (keine Klammern, Funktionsaufrufe)
// value binding
let firstname : string = "Roman"
open System.Reflection
open System.Windows.Forms
open System.Security.Cryptography
let age : int = 37
// type inference
open System
open System.ComponentModel
open System
// 1. Schreibe ein Programm, dass einen Character einliest und ihn wieder ausgibt
// [<EntryPoint>]
// let main argv =
// Console.WriteLine "Hallo was willste?"
type Event =
| One
| Two
| Three
type Command =
| One
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="../Domain/Model.fs" />
<Compile Include="../Domain/Commands.fs" />
<Compile Include="AuthTypes.fs" />
@rommsen
rommsen / Http.fs
Last active June 29, 2017 07:01
Updated Http.fs file from F# Applied to work with current version of Http.fs
module Http
open HttpFs.Client
open Hopac
open FSharp.Control.Reactive
type HttpResponse =
| Ok of string
| Error of int
@rommsen
rommsen / Test.elm
Created November 18, 2016 10:02
Elm-Select Box. Json-Decode-map
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (on, targetValue)
import Html.Attributes exposing (..)
import Json.Decode as Json
import Date
type alias Model =