This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
var dialog = new FolderBrowserDialog(); | |
dialog.ShowDialog(); | |
folderpathTB.Text = dialog.SelectedPath; | |
#1 Change the DB to single-user mode; | |
e.g. in SQL Configuration Manager, SQL Server services / <Your Server> / Properties / Startup Parameters | |
-f (Add, Apply) | |
RESTART (or stop, start) | |
#2 | |
C:\Users\Administrator>SQLCMD -H $localhost | |
1> CREATE LOGIN newSA WITH PASSWORD = 'Pass@123' | |
2> go | |
1> ALTER SERVER ROLE sysadmin ADD MEMBER newSA |
List ALL branches | |
>git branch | |
LIST branches by wildcard | |
>git branch --list "122160*" | |
====================== | |
CLONE A SINGLE BRANCH | |
====================== |
declare @result int | |
SET @result = (NEXT VALUE FOR dbo.auto_seq) | |
select @result |
https://learn.microsoft.com/en-us/azure/azure-monitor/app/ilogger | |
This helped me REDIRECT on Auth Failed! | |
https://github.com/dotnet/aspnetcore/issues/22596 | |
OnAuthenticationFailed = context => | |
{ | |
context.Response.Redirect("/Error"); | |
context.HandleResponse(); // Suppress the exception | |
return Task.CompletedTask; | |
}, |
I am annoyed as fck there is no point-and-click UI to do this; | |
Hence these notes as a reminder; | |
FIRST INSTALL via NuGet in YOUR project (NB: you may have multiple projects in the solution!) | |
a) 'Microsoft.EntityFrameworkCore'; | |
b) 'Microsoft.EntityFrameworkCore.SqlServer'; choose the PROVIDER you want to use in the Scaffold-DbContext command. | |
c) 'Microsoft.EntityFrameworkCore.Tools'; this is so you can 'scaffold', i.e. generate code automatically; only fools will do the hard-work of writing by hand! | |
-- | |
Above uses Visual Studio UI; |
Chrome Browser's SQLite location: | |
C:\Users\<user-name>\AppData\Local\Google\Chrome\User Data\Default\databases | |
//#1. for . . . in | |
//By looping through the keys, you can get the value using object[key] | |
const object = { | |
name: "Cindi", | |
language:"js" | |
} | |
for(const key in object){ | |
const value = object[key] |
This document now exists on the official ASP.NET core docs page.