This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ddd_patterns.Step6 | |
{ | |
public interface IPaymentService | |
{ | |
public bool Pay(decimal amount, decimal vat); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data.SqlClient; | |
namespace ddd_patterns.Step2 | |
{ | |
public class OnlineTickets | |
{ | |
private readonly string _connectionString; | |
public OnlineTickets(string connectionString) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Event = | |
| One | |
| Two | |
| Three | |
type Command = | |
| One |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Http | |
open HttpFs.Client | |
open Hopac | |
open FSharp.Control.Reactive | |
type HttpResponse = | |
| Ok of string | |
| Error of int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = |