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
    
  
  
    
  | PS C:\Users\ docker build -t myApplication/myApp:v1.0 --file <location of the Dockerfile> | 
  
    
      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
    
  
  
    
  | FROM mcr.microsoft.com/windows/servercore:ltsc2019 --> Indicates that windows server core to be downloaded | |
| ADD "C:\myApplication\build\app.exe" "C:\myAppInProd\bin\" | |
| RUN ["powershell", "app.exe", "C:\myAppInProd\bin\"] --> Indicates what should happen when the container runs i.e. run the application | 
  
    
      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
    
  
  
    
  | FROM <image source usually container repository> | |
| LABEL <name or contact details of the person creating this image> | |
| ADD <source location anywhere> <target location on the container> | |
| RUN <some commands or action to execute when the container runs | 
  
    
      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
    
  
  
    
  | { | |
| "type": "Microsoft.Sql/servers/vulnerabilityAssessments", | |
| "apiVersion": "2018-06-01-preview", | |
| "name": "[concat(variables('sqlServername'), '/vulnerabilityAssessments')]", | |
| "dependsOn": [ | |
| "[resourceId('Microsoft.Sql/servers', variables('sqlServername'))]", | |
| "[resourceId('Microsoft.Storage/StorageAccounts', variables('storageAccountNameVA'))]" | |
| ], | |
| "properties": { | |
| "storageContainerPath": "[concat('https://', variables('storageAccountNameVA'), '.blob.core.windows.net/vulnerability-assessment/')]" | 
  
    
      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
    
  
  
    
  | DELIMITER :: | |
| CREATE PROCEDURE Hent_Ut_Pris(IN SjekkPris DECIMAL) | |
| BEGIN | |
| SELECT * | |
| FROM Forsikring | |
| WHERE Pris >= SjekkPris; | |
| END:: | |
| DELIMITER ; | 
  
    
      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
    
  
  
    
  | -- View "Visning" | |
| CREATE VIEW Bestilling_Fra_Stavanger AS | |
| SELECT Bdato, ForsikringsNavn, KategoriNavn, Navn, Etternavn, PostSted | |
| FROM Kunde, PostSted, Kategori, Bestilling JOIN Forsikring ON Bestilling.ForsikringsNr = Forsikring.ForsikringsNr | |
| WHERE Forsikring.katnr = Kategori.katnr AND Bestilling.kundenr = kunde.kundenr AND kunde.postnr = PostSted.postNr | |
| HAVING PostSted = 'Stavanger'; | |
  
    
      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
    
  
  
    
  | -- Oppretter trigger | |
| DELIMITER !! | |
| CREATE TRIGGER PrisEndring | |
| AFTER UPDATE ON Forsikring | |
| FOR EACH ROW | |
| BEGIN | |
| INSERT INTO PrisHistorikk(ForsikringsNr, DatoPrisEndring,TidligerePris) | 
  
    
      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
    
  
  
    
  | -- Full outer join, | |
| SELECT ForsikringsNavn, Pris, DatoPrisEndring, Tidligerepris | |
| FROM Forsikring, PrisHistorikk; | |
| -- Inner Join | |
| SELECT ForsikringsNavn, Pris, DatoPrisEndring, Tidligerepris | |
| FROM Forsikring JOIN PrisHistorikk ON forsikring.forsikringsnr = prishistorikk.forsikringsnr; | 
  
    
      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
    
  
  
    
  | -- DROP Schema ForsikringenDin; | |
| -- Opprette databasen-- -- | |
| CREATE SCHEMA IF NOT EXISTS ForsikringenDin; | |
| USE ForsikringenDin; | |
| -- Slette tabeller om de allerede eksisterer, husk rett rekkefølge! | |
| -- Dette for å få et skcript som kan kjøre flere ganger | |