Intro There's an F# library that provides an ORM experience that is arguably superior to Entity Framework. This library is the SqlProvider. Establishing Connection The following code establishes a connection to SQL Server: namespace DevOps.DataGateway open FSharp.Data.Sql module SqlConnection = //---------------------------------------------------------------------------------------------------- // UPDATE CONNECTION STRING !!! //---------------------------------------------------------------------------------------------------- [<Literal>] let string = "Data Source=MY_MACHINE_NAME\SqlExpress;Initial Catalog=DevOps;Integrated Security=True" …
Twilio Integration with F#
Intro I decided to document some Twilio integration details for a hobby project that I'm working on. Sms Module Here's the core module for sending an Sms via Twilio: namespace CourierPayroll.DataGateway open Twilio open Twilio.Types open Twilio.Rest.Api.V2010.Account open CourierPayroll.DataTransfer module Sms = let formattedNumber (toPhone:string) = let usaCode = "+1" let phoneWithPrefix = if toPhone.Chars …
Implementing F# inspired Result in C#
Here's a F# inspired Result type implemented in C#: public class Error { public Error(string error) => Value = error; public string Value { get; } } public class Result<T> { readonly string _error; public Result(Error error) => _error = error.Value; public Result(T value) => Value = value; public bool IsSuccessful { get => _error …
Implementing Azure SignalR
Client - Configuring Connection Data Here's the URL and target id that the client uses for messaging using SignalR: Client - Establishing Connection Here's the client's SignalR service implementation: The ConnectAsync method above registers the identifier that the SignalR Hub (on the server) will route messages to. In this case, the identifier is the courier …
Azure Monitor – Query Logs
Logs Navigation 1. Select the Azure Functions app 2. Under Configured Features, select Application Insights 3. Select "Logs" from the Navigation bar Logs Query The following query attempts to pull 10 'Trace' records that contain the word "location" with a severity-level of "1", and sorts them in descending order:
Azure Topic Listener on Mobile
Here's my brain dump before for a mobile app running an Azure Topic Listener: SubscriptionInfo Listener
Azure Topic Subscription using Filter
Here's how I once implemented an Azure Topic subscription:
Masterminds (Vol. 50)
Order fulfillment TDD applied prescriptively Thought leaders I agree with https://youtu.be/gh51wC-ARO0
Azure: Generate Topics Programmatically
The following code invokes an Azure topics generator: Here's the topics generator: Here's the Azure topic CRUD operations:
Create Azure Service Bus Topic Programmatically
Here's a test: Here's a module: