How can I tell what version of SQL Server that I have?

Example: -1253826760 = Desktop -1592396055 = Express -1534726760 = Standard 1333529388 = Workgroup 1804890536 = Enterprise -323382091 = Personal -2117995310 = Developer 610778273 = Enterprise Evaluation 1044790755 = Windows Embedded SQL 4161255391 = Express with Advanced Services

Install .NET 6 Entity Framework

Install the following packages from Nuget Package Manager… Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.Design Microsoft.EntityFrameworkCore.SqlServer Install Entity Framework.. Check to see if Entity Framework is installed You will get the following if EF is not installed… dotnet : Could not execute because the specified command or file was not found. At line:1 char:1 + dotnet ef + ~~~~~~~~~ +... » read more

ASP.NET 6 Web API

Create New Project Template: ASP.NET Core Web API Framework: .NET 6.0 Check “Configure for HTTPS“ Check “Use controllers (uncheck to use minimal API)” for controller vs minimal API Check “Enable OpenAPI support” for Swagger OpenAPI support Book Class Book Controller or … For Delete, pass in object instead of id. BookController using Entity Framework Example:

CRUD with a .NET 6 Web API & Entity Framework Core Example

Visual Studio 2022 New Project Template: ASP.NET Core Web API Framework: .NET 6.0 Check “Configure for HTTPS“ Check “Use controllers (uncheck to use minimal API)” for controller vs minimal API Check “Enable OpenAPI support” for Swagger OpenAPI support Entity Framework Install the following from Nuget Package Manager… Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.Design Microsoft.EntityFrameworkCore.SqlServer PM> dotnet tool install –global... » read more

Login failed due to trigger execution

Error: Login failed for login <Login Name> due to trigger execution. Changed database context to ‘master’. Changed language setting to us_english. (Microsoft SQL Server, Error: 17892) Resolution: Search for the trigger via: If you see a server level trigger that might be responsible for the login issues, then you can drop it with: Instead of... » read more

Temporal System-Versioned Table

Temporal tables (also known as system-versioned temporal tables) are a database feature that brings built-in support for providing information about data stored in the table at any point in time, rather than only the data that is correct at the current moment in time. Example: Employee (System-Versioned) Sources: https://docs.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables?view=sql-server-ver15

Minimal APIs Demo using .NET6 , EFCore6 and Sql Server

Article: https://medium.com/geekculture/minimal-apis-in-net-6-a-complete-guide-beginners-advanced-fd64f4da07f5 Source Code Example: https://github.com/csehammad/MinimalAPIDemo/ Live Example: https://minimalapidemo.azurewebsites.net/swagger/index.html DB Script: Create a new database and run the script located at /DB/AuthorsDB_Script.sql Live Demo: https://minimalapidemo.azurewebsites.net/swagger/index.html This project demonstrates the following: How to create a CRUD APIs in .NET6 using Minimal APIS. How to add OpenAPI Specifications using Swagger How to Secure Minimal APIs using JWT Authentication

Access to fetch at ‘xxxxx’ from origin ‘xxxxxxx’ has been blocked by CORS policy for Azure Function App

Error: Access to fetch at ‘xxxxx’ from origin ‘xxxxxxx’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled. Issue: Cross-Origin... » read more

Generate Logs for Microsoft Support Troubleshooting for AlwaysOn

Please open the below link https://aka.ms/getTSS 2. Copy the zip file to the Server 3. Unzip the contents of tss_tools.zip to a folder 4. Open PowerShell as Administrator 5. Change to the directory where the files were extracted 6. Run the following command: .\get-psSDP.ps1 Cluster In case if this command does not work please try .\tss... » read more