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
/* | |
Expected JSON: | |
{ | |
"Subject": "Form's Subject", | |
"FirstName": "Davide", | |
"LastName": "Mauri", | |
"EmailAddress": "info@davidemauri.it", | |
"OtherField1": "OtherValue1", |
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
/* | |
Create the Database Master Key, if needed | |
*/ | |
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'My-L0ng&Str0ng_P4ss0wrd!'; | |
GO | |
/* | |
Create database scoped credentials to store the Shared Access Signature (SAS) | |
needed to access the Azure Blob Container. More info on Azure Blob SAS here: | |
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.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authentication; | |
using Microsoft.AspNetCore.Authentication.OAuth; | |
using Newtonsoft.Json.Linq; |
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
USE tempdb | |
GO | |
/* | |
Generate Sample Data | |
*/ | |
DROP TABLE IF EXISTS dbo.[Sample] | |
GO | |
WITH cte AS |
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
Invoke-WebRequest https://aka.ms/installazurecliwindows -OutFile AzCliLatest.msi | |
.\AzCliLatest.msi /passive |
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
# Taken from https://joonro.github.io/blog/posts/powershell-customizations.html | |
# and https://hodgkins.io/ultimate-powershell-prompt-and-git-setup | |
Import-Module posh-git | |
Import-Module Get-ChildItemColor | |
Import-Module PSReadLine | |
$global:GitPromptSettings.BeforeText = '[' | |
$global:GitPromptSettings.AfterText = '] ' |
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.Collections.Generic; | |
using System.Data; | |
using System.Data.SqlClient; | |
using Dapper; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
namespace stackoverflow_dapper_50091943 | |
{ |
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
use tempdb | |
go | |
drop table if exists dbo.City; | |
drop table if exists dbo.Country; | |
drop table if exists dbo.Continent; | |
create table dbo.Continent | |
( | |
continent_id int not null primary key, |
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
Login-AzureRmAccount | |
Select-AzureRmSubscription -Subscription <your-subscription-id> | |
$servers = Get-AzureRmSqlServer | |
foreach($s in $servers) { | |
$databases = Get-AzureRmSqlDatabase -ServerName $s.ServerName -ResourceGroupName $s.ResourceGroupName | |
foreach ($d in $databases) | |
{ |
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
/* | |
Create the Database Master Key, if needed | |
*/ | |
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'My-L0ng&Str0ng_P4ss0wrd!'; | |
GO | |
/* | |
Create database scoped credentials to store the Shared Access Signature (SAS) | |
needed to access the Azure Blob Container. More info on Azure Blob SAS here: | |