This file contains hidden or 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 "nuget: System.Data.SQLite" | |
| #r "nuget: Dapper" | |
| open System | |
| open Dapper | |
| open System.Data | |
| open System.Data.SQLite | |
| [<CLIMutable>] // This creates private setters for Dapper to work with, but your F# code cannot | |
| type Person = { Id: int; First: string; Last: string } |
This file contains hidden or 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 Microsoft.AspNetCore.Builder | |
| open Microsoft.Extensions.Hosting | |
| open Microsoft.Extensions.DependencyInjection | |
| open Microsoft.FSharp.Core | |
| open Microsoft.OpenApi.Models | |
| open Swashbuckle.AspNetCore.SwaggerGen | |
| type Child = { Text: string } | |
| type Parent = { Child: Child option } |
This file contains hidden or 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 "nuget: CsvHelper" | |
| open System | |
| open CsvHelper | |
| type Transaction = { Amount: float; Date: DateOnly; Description: string } | |
| let readTransactions() : Transaction list = [ | |
| use reader = new IO.StringReader(""" | |
| Account Number,Posted Date,Check,Description,Debit,Credit |
OlderNewer