docker system prune -a -f
az login
az account set -s "Visual Studio Ultimate med MSDN"
az group create -g demo-rg -l swedencentral
az acr create -n classon -g demo-rg -l swedencentral --sku Basic
az group delete -g demo-rg -y
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
git: | |
skipHookPrefix: WIP | |
autoFetch: true | |
autoRefresh: true | |
fetchAll: true | |
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName} --} | |
allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium | |
overrideGpg: false | |
disableForcePushing: false | |
parseEmoji: false |
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
param ( | |
[string]$Pat = $env:AzureDevOpsReleaseNotesPat, | |
[string]$Organization = $env:AzureDevOpsReleaseNotesOrganization, | |
[string]$Project = $env:AzureDevOpsReleaseNotesProject, | |
[string]$Query = 'My Queries/Release Notes', | |
[string]$Header = 'Release Notes', | |
[switch]$IncludeUrls | |
) | |
$ErrorActionPreference = 'Stop' |
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
internal class MyContext : DbContext | |
{ | |
// ... | |
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
{ | |
if (!optionsBuilder.IsConfigured) // This prevents multiple configurations | |
{ | |
optionsBuilder.UseSqlite(@"Data Source=c:\temp\mydatabase.sqlite;"); | |
} | |
// ... |
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 (var factory = new TestContextFactory()) | |
using (var context = factory.CreateInMemorySqlite<MyContext>(migrate: true)) | |
{ | |
RunScenario(context); | |
} | |
// Or... | |
using (var factory = new TestContextFactory()) | |
using (var context = factory.CreateInMemoryDatabase<MyContext>()) | |
{ | |
RunScenario(context); |
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.Common; | |
using Microsoft.Data.Entity; | |
using Microsoft.Data.Sqlite; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace EF.TestUtils | |
{ | |
public sealed class TestContextFactory : IDisposable | |
{ |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$True)] | |
[string]$Source, | |
[Parameter(Mandatory=$True)] | |
[string]$Target | |
) | |
gci $Source -Recurse -Filter ".git" -Force -Directory | %{ | |
$dir = Join-Path (Join-Path $target $_.Parent.Name) ".git" |
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
param([string]$SourceDir = $env:BUILD_SOURCESDIRECTORY, | |
[string]$TempDir = $env:TEMP) | |
$ErrorActionPreference = "Stop" | |
<# | |
Pester is downloaded to the local user temp directory instead of the build source | |
folder because of two reasons: | |
* It can be reused between runs on the same machine. | |
* Pester is actually tested by tests written in Pesters own test framework, and | |
they are included in the module source. To prevent that these tests will be run | |
along with the tests of your project, the module is placed in an outside folder. |