jkone27 / FsharpWebApi

fsharp web api example
MIT License
13 stars 2 forks source link

FsharpWebApi

Compares two almost identical APIs in F# and C#.

Features:

A medium article describing the repository

C

Uses EF core SQL server, ef migrations

F

Uses Swashbuckle for swagger and also FSharp.Data to read appsetting.json, and SwaggerTypeProvider for connecting to petstore test api, and Fsharp.Data.SqlProvider for an EF like experience for SQL query, and DBup for migrations.

C# Friendlier

Uses ! at the beginning of constructs which discard the value, to avoid doing the more verbose (and very different from C#) |> ignore.

module TerseIgnore =
    //readability trick
    let (!) a = a |> ignore